Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 16e7549f045d Btrfs: incompatible format change to remove hole extents.
The bot has tested the following trees: v5.1.3, v5.0.17, v4.19.44, v4.14.120, v4.9.177, v4.4.180, v3.18.140.
v5.1.3: Build OK!
v5.0.17: Build OK!
v4.19.44: Build OK!
v4.14.120: Failed to apply! Possible dependencies:
22d3151c2c4c ("Btrfs: send, fix incorrect file layout after hole punching beyond eof")
v4.9.177: Failed to apply! Possible dependencies:
22d3151c2c4c ("Btrfs: send, fix incorrect file layout after hole punching beyond eof")
v4.4.180: Failed to apply! Possible dependencies:
22d3151c2c4c ("Btrfs: send, fix incorrect file layout after hole punching beyond eof")
v3.18.140: Failed to apply! Possible dependencies:
22d3151c2c4c ("Btrfs: send, fix incorrect file layout after hole punching beyond eof")
How should we proceed with this patch?
--
Thanks,
Sasha
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 90e457f7be08 perf tools: Add Intel PT support.
The bot has tested the following trees: v5.1.3, v5.0.17, v4.19.44, v4.14.120, v4.9.177, v4.4.180.
v5.1.3: Build OK!
v5.0.17: Build OK!
v4.19.44: Failed to apply! Possible dependencies:
4eb068157121 ("perf script: Make itrace script default to all calls")
v4.14.120: Failed to apply! Possible dependencies:
20d9c478b01a ("pert tools: Add queue management functionality")
440a23b34c06 ("perf tools: Add initial entry point for decoder CoreSight traces")
4eb068157121 ("perf script: Make itrace script default to all calls")
68ffe3902898 ("perf tools: Add decoder mechanic to support dumping trace data")
9f878b29da96 ("perf tools: Add full support for CoreSight trace decoding")
b12235b113cf ("perf tools: Add mechanic to synthesise CoreSight trace packets")
ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support")
v4.9.177: Failed to apply! Possible dependencies:
20d9c478b01a ("pert tools: Add queue management functionality")
3bdafdffa9ba ("perf auxtrace: Add itrace option to output ptwrite events")
440a23b34c06 ("perf tools: Add initial entry point for decoder CoreSight traces")
4eb068157121 ("perf script: Make itrace script default to all calls")
68ffe3902898 ("perf tools: Add decoder mechanic to support dumping trace data")
70d110d77599 ("perf auxtrace: Add itrace option to output power events")
9f878b29da96 ("perf tools: Add full support for CoreSight trace decoding")
b12235b113cf ("perf tools: Add mechanic to synthesise CoreSight trace packets")
ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support")
v4.4.180: Failed to apply! Possible dependencies:
3bdafdffa9ba ("perf auxtrace: Add itrace option to output ptwrite events")
3becf4525d9c ("perf tools: Add sink configuration for cs_etm PMU")
403cacb8a25e ("perf unwind: Don't mix LIBUNWIND_LIBS into LIBUNWIND_LDFLAGS")
440a23b34c06 ("perf tools: Add initial entry point for decoder CoreSight traces")
4eb068157121 ("perf script: Make itrace script default to all calls")
5a155bb77a67 ("perf build: Remove all condition feature check {C,LD}FLAGS")
68ffe3902898 ("perf tools: Add decoder mechanic to support dumping trace data")
70d110d77599 ("perf auxtrace: Add itrace option to output power events")
7e21b0d579a4 ("perf tools: Make coresight PMU listable")
9d8e14d306ef ("perf unwind: Separate local/remote libunwind config")
9f878b29da96 ("perf tools: Add full support for CoreSight trace decoding")
a818c563ae16 ("perf tools: Add coresight etm PMU record capabilities")
b12235b113cf ("perf tools: Add mechanic to synthesise CoreSight trace packets")
d1706b39f0af ("perf tools: Add support for skipping itrace instructions")
ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support")
How should we proceed with this patch?
--
Thanks,
Sasha
Up until now trimming the freespace was done irrespective of what the
arguments of the FITRIM ioctl were. For example fstrim's -o/-l arguments
will be entirely ignored. Fix it by correctly handling those paramter.
This requires breaking if the found freespace extent is after the end of
the passed range as well as completing trim after trimming
fstrim_range::len bytes.
Fixes: 499f377f49f0 ("btrfs: iterate over unused chunk space in FITRIM")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Nikolay Borisov <nborisov(a)suse.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
---
Hello,
Here is a backport to 4.9.y of upstream commit: c2d1b3aae33605a61cbab445d8ae1c708ccd2698
Please apply.
fs/btrfs/extent-tree.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 7938c48c72ff..6b29165f766f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -11150,9 +11150,9 @@ int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end)
* transaction.
*/
static int btrfs_trim_free_extents(struct btrfs_device *device,
- u64 minlen, u64 *trimmed)
+ struct fstrim_range *range, u64 *trimmed)
{
- u64 start = 0, len = 0;
+ u64 start = range->start, len = 0;
int ret;
*trimmed = 0;
@@ -11188,8 +11188,8 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
atomic_inc(&trans->use_count);
spin_unlock(&fs_info->trans_lock);
- ret = find_free_dev_extent_start(trans, device, minlen, start,
- &start, &len);
+ ret = find_free_dev_extent_start(trans, device, range->minlen,
+ start, &start, &len);
if (trans)
btrfs_put_transaction(trans);
@@ -11201,6 +11201,16 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
break;
}
+ /* If we are out of the passed range break */
+ if (start > range->start + range->len - 1) {
+ mutex_unlock(&fs_info->chunk_mutex);
+ ret = 0;
+ break;
+ }
+
+ start = max(range->start, start);
+ len = min(range->len, len);
+
ret = btrfs_issue_discard(device->bdev, start, len, &bytes);
up_read(&fs_info->commit_root_sem);
mutex_unlock(&fs_info->chunk_mutex);
@@ -11211,6 +11221,10 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
start += len;
*trimmed += bytes;
+ /* We've trimmed enough */
+ if (*trimmed >= range->len)
+ break;
+
if (fatal_signal_pending(current)) {
ret = -ERESTARTSYS;
break;
@@ -11295,8 +11309,7 @@ int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range)
mutex_lock(&fs_info->fs_devices->device_list_mutex);
devices = &fs_info->fs_devices->devices;
list_for_each_entry(device, devices, dev_list) {
- ret = btrfs_trim_free_extents(device, range->minlen,
- &group_trimmed);
+ ret = btrfs_trim_free_extents(device, range, &group_trimmed);
if (ret) {
dev_failed++;
dev_ret = ret;
--
2.17.1
Hi,friend,
This is Daniel Murray and i am from Sinara Group Co.Ltd in Russia.
We are glad to know about your company from the web and we are interested in your products.
Could you kindly send us your Latest catalog and price list for our trial order.
Best Regards,
Daniel Murray
Purchasing Manager
Up until now trimming the freespace was done irrespective of what the
arguments of the FITRIM ioctl were. For example fstrim's -o/-l arguments
will be entirely ignored. Fix it by correctly handling those paramter.
This requires breaking if the found freespace extent is after the end of
the passed range as well as completing trim after trimming
fstrim_range::len bytes.
Fixes: 499f377f49f0 ("btrfs: iterate over unused chunk space in FITRIM")
CC: stable(a)vger.kernel.org # 4.4+
Signed-off-by: Nikolay Borisov <nborisov(a)suse.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
---
Hello,
Here is a backport of upstream commit c2d1b3aae33605a61cbab445d8ae1c708ccd2698
to 4.4.y kernel.
fs/btrfs/extent-tree.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 978bbfed5a2c..df2bb4b61a00 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -10730,9 +10730,9 @@ int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end)
* transaction.
*/
static int btrfs_trim_free_extents(struct btrfs_device *device,
- u64 minlen, u64 *trimmed)
+ struct fstrim_range *range, u64 *trimmed)
{
- u64 start = 0, len = 0;
+ u64 start = range->start, len = 0;
int ret;
*trimmed = 0;
@@ -10768,8 +10768,8 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
atomic_inc(&trans->use_count);
spin_unlock(&fs_info->trans_lock);
- ret = find_free_dev_extent_start(trans, device, minlen, start,
- &start, &len);
+ ret = find_free_dev_extent_start(trans, device, range->minlen,
+ start, &start, &len);
if (trans)
btrfs_put_transaction(trans);
@@ -10781,6 +10781,16 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
break;
}
+ /* If we are out of the passed range break */
+ if (start > range->start + range->len - 1) {
+ mutex_unlock(&fs_info->chunk_mutex);
+ ret = 0;
+ break;
+ }
+
+ start = max(range->start, start);
+ len = min(range->len, len);
+
ret = btrfs_issue_discard(device->bdev, start, len, &bytes);
up_read(&fs_info->commit_root_sem);
mutex_unlock(&fs_info->chunk_mutex);
@@ -10791,6 +10801,10 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
start += len;
*trimmed += bytes;
+ /* We've trimmed enough */
+ if (*trimmed >= range->len)
+ break;
+
if (fatal_signal_pending(current)) {
ret = -ERESTARTSYS;
break;
@@ -10857,8 +10871,7 @@ int btrfs_trim_fs(struct btrfs_root *root, struct fstrim_range *range)
mutex_lock(&root->fs_info->fs_devices->device_list_mutex);
devices = &root->fs_info->fs_devices->devices;
list_for_each_entry(device, devices, dev_list) {
- ret = btrfs_trim_free_extents(device, range->minlen,
- &group_trimmed);
+ ret = btrfs_trim_free_extents(device, range, &group_trimmed);
if (ret)
break;
--
2.17.1
Hi,
I didn’t know if you had received my email from last week?
We manufacture ALL custom LOGO and branded products – over 300,000 to
choose from.
The most asked about product that we make, is the custom printed USB flash
drives!
We can print your logo on them and load your digital images, videos and
files!
Here is what we include:
-Any size memory you need: 64MB up to 128GB
-We will print your logo on both sides, just ask!
-Very Low Order Minimums
-Need them quickly? Not a problem, we offer Rush Service
Email over a copy of your logo and we will create a design mock up for you
at no cost!
Our higher memory sizes are a really good option right now!
Pricing is low right now, so let us know what you need and we will get you
a quick quote.
We always offer great rates for schools and nonprofits as well.
Let us know what you would like quoted?
Regards,
Heather Millons
Custom USB Account Manager
Hi,
I didn’t know if you had received my email from last week?
We manufacture ALL custom LOGO and branded products – over 300,000 to
choose from.
The most asked about product that we make, is the custom printed USB flash
drives!
We can print your logo on them and load your digital images, videos and
files!
Here is what we include:
-Any size memory you need: 64MB up to 128GB
-We will print your logo on both sides, just ask!
-Very Low Order Minimums
-Need them quickly? Not a problem, we offer Rush Service
Email over a copy of your logo and we will create a design mock up for you
at no cost!
Our higher memory sizes are a really good option right now!
Pricing is low right now, so let us know what you need and we will get you
a quick quote.
We always offer great rates for schools and nonprofits as well.
Let us know what you would like quoted?
Regards,
Heather Millons
Custom USB Account Manager