On 02/11/17 07:03, Omar Sandoval wrote:
From: Omar Sandoval
If btrfs_decompress_buf2page() is handed a bio with its page in the
middle of the working buffer, then we adjust the offset into the working
buffer. After we copy into the bio, we advance the iterator by the
number of bytes we copie
Hi Chandan,
On 07/17/15 12:56, Chandan Rajendra wrote:
When running generic/311 on Btrfs' subpagesize-blocksize patchset (on ppc64
with 4k sectorsize and 16k node/leaf size) I noticed the following call trace,
BTRFS (device dm-0): parent transid verify failed on 29720576 wanted 160 found
158
Hi Chandan,
This bug is easily recreated when executing the test on Btrfs with
subpage-blocksize patchset applied. I haven't been able to test the recently
rebased subpage-blocksize patchset yet.
Coming back to the issue ... The problem exists because the test code uses
dm-flakey. Josef had s
AFAIK, no, it hasn't been fixed, at least not in mainline, because the
patches to fix it got stuck in some long-running project patch queue
(IIRC, the one for on-degraded auto-device-replace), with no timeline
known to me on mainline merge.
Meanwhile, the problem as I understand it is that at t
-fee294552f1b
is missing
BTRFS error (device vdb6): failed to read the system array: -5
BTRFS error (device vdb6): open_ctree failed
Reviewed-by: Anand Jain
Thanks, Anand
Signed-off-by: Qu Wenruo
---
fs/btrfs/volumes.c | 25 ++---
fs/btrfs/volumes.h | 2 ++
2 files
1) About reentrancy
In previous version, the err_* bits are still put into btrfs_devices
structure, just timing of resetting these bits are changes.
So either way, it's not reentrant in theory.
But that doesn't make a problem, as we have other things to protect when
calling write_all_supers
.
Looks good.
Reviewed-by: Anand Jain
Thanks, Anand
Signed-off-by: Qu Wenruo
---
fs/btrfs/volumes.c | 53 +
fs/btrfs/volumes.h | 1 +
2 files changed, 54 insertions(+)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
On 03/06/2017 04:58 PM, Qu Wenruo wrote:
The last user of num_tolerated_disk_barrier_failures is
barrier_all_devices().
But it's can be easily changed to new per-chunk degradable check
framework.
Now btrfs_device will have two extra members, representing send/wait
error, set at write_dev_flush
sign-off and change commit log
update (sorry for that)
[2] http://www.spinics.net/lists/linux-btrfs/msg55038.html
Can you pls squash [1] to this patch.
With that.
Looks good.
Reviewed-by: Anand Jain
While you are here, can you also consider..
-
@@ -6843,7 +6843,7 @@ bool
v3:
Remove one duplicated missing device output
Use the advice from Anand Jain, not to add new members in btrfs_device,
but use a new structure extra_rw_degrade_errors, to record error when
sending down/waiting device.
Suggested local variables because, v2 had theoretical bug as
Looks like I found an unrelated bug, though, that messed with my testing.
And it looks like a nasty one: once "btrfs dev scan" sees a disk, it
stores
its device and will then happily use it without verification even if it's
been pulled out and replaced by something else. Lemme investigate that
Looks like I found an unrelated bug, though, that messed with my testing.
And it looks like a nasty one: once "btrfs dev scan" sees a disk, it
stores
its device and will then happily use it without verification even if it's
been pulled out and replaced by something else. Lemme investigate that
.
Signed-off-by: Qu Wenruo
Signed-off-by: Anand Jain
Tested-by: Austin S. Hemmelgarn
Tested-by: Adam Borowski
Tested-by: Dmitrii Tcvetkov
---
fs/btrfs/volumes.c | 55 ++
fs/btrfs/volumes.h | 1 +
2 files changed, 56 insertions(+)
diff --git
These patches provide cleanup of the function barrier_all_devices().
Anand Jain (4):
btrfs: REQ_PREFLUSH does not use btrfs_end_bio() completion callback
btrfs: Communicate back ENOMEM when it occurs
btrfs: cleanup barrier_all_devices() unify dev error count
btrfs: cleanup
REQ_PREFLUSH bio to flush dev cache uses btrfs_end_empty_barrier()
completion callback only, as of now, and there it accounts for dev
stat flush errors BTRFS_DEV_STAT_FLUSH_ERRS, so remove it from the
btrfs_end_bio().
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 3 ---
1 file changed, 3
The only error that write dev flush (send) will fail is due
to the ENOMEM then, as its not a device specific error and
rather a system wide issue, we should rather stop further
iterations and perpetuate the -ENOMEM error to the caller.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 2 +-
1
functions such as btrfs_dev_stats_dirty() couldn't be used
because it doesn't monitor the flush errors BTRFS_DEV_STAT_FLUSH_ERRS.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 96 +++---
1 file changed, 85 insertions(+), 11 deletion
owever I still kept
bdev == NULL counted towards error device in view of future
enhancements. And as the device_list_mutex is held when
barrier_all_devices() is called, I don't expect a new bdev to null
in between send and wait.
Now in this process I also rename error_wait to dropouts.
Signed-
Qu,
patch 4/4 added a cleanup for barrier_all_devices() and introduced
a new function check_barrier_error() where integration with per chunk
level device check will simplify.
[PATCH 4/4] btrfs: cleanup barrier_all_devices() to check dev stat
flush error
Thanks, Anand
On 03/09/2017 09:34
Thanks for the review..
On 03/13/2017 05:05 PM, Qu Wenruo wrote:
At 03/13/2017 03:42 PM, Anand Jain wrote:
The objective of this patch is to cleanup barrier_all_devices()
so that the error checking is in a separate loop independent of
of the loop which submits and waits on the device
+struct device_checkpoint {
+struct list_head list;
+struct btrfs_device *device;
+int stat_value_checkpoint;
+};
+
+static int add_device_checkpoint(struct list_head *checkpoint,
Could we have another structure instead of list_head to record device
checkpoints?
The list_head is
functions such as btrfs_dev_stats_dirty() couldn't be used
because it doesn't monitor the flush errors BTRFS_DEV_STAT_FLUSH_ERRS.
Signed-off-by: Anand Jain
---
v2: Address Qu review comments viz..
Add meaningful names, like cp_list (for checkpoint_list head).
(And actually i
On 03/28/2017 11:19 PM, David Sterba wrote:
On Mon, Mar 13, 2017 at 03:42:11PM +0800, Anand Jain wrote:
REQ_PREFLUSH bio to flush dev cache uses btrfs_end_empty_barrier()
completion callback only, as of now, and there it accounts for dev
stat flush errors BTRFS_DEV_STAT_FLUSH_ERRS, so remove
On 03/28/2017 11:38 PM, David Sterba wrote:
On Mon, Mar 13, 2017 at 03:42:12PM +0800, Anand Jain wrote:
The only error that write dev flush (send) will fail is due
to the ENOMEM then, as its not a device specific error and
rather a system wide issue, we should rather stop further
iterations
On 03/29/2017 12:19 AM, David Sterba wrote:
On Tue, Mar 14, 2017 at 04:26:11PM +0800, Anand Jain wrote:
The objective of this patch is to cleanup barrier_all_devices()
so that the error checking is in a separate loop independent of
of the loop which submits and waits on the device flush
synchronization guarantees.
The conversion replaces:
* atomic_xchg(..., 1)-> test_and_set_bit(FLAG, ...)
* atomic_set(..., 0) -> clear_bit(FLAG, ...)
Makes sense.
Reviewed-by: Anand Jain
However in the long term do you think its better to have
BTRFS_FS_EXCL_OP flag
On 03/29/2017 06:00 PM, Anand Jain wrote:
On 03/28/2017 11:19 PM, David Sterba wrote:
On Mon, Mar 13, 2017 at 03:42:11PM +0800, Anand Jain wrote:
REQ_PREFLUSH bio to flush dev cache uses btrfs_end_empty_barrier()
completion callback only, as of now, and there it accounts for dev
stat flush
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 3 ---
fs/btrfs/volumes.h | 1 -
2 files changed, 4 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 08b74daf35d0..9de35bca1f67 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3521,9 +3521,6 @@ static int
As of now we do alloc an empty bio and then use the flag REQ_PREFLUSH
to flush the device cache, instead we can use blkdev_issue_flush()
for this puspose.
Also now no need to check the return when write_dev_flush() is called
with wait = 0
Signed-off-by: Anand Jain
---
V2
Title of this patch
owever I still kept
bdev == NULL counted towards error device in view of future
enhancements. And as the device_list_mutex is held when
barrier_all_devices() is called, I don't expect a new bdev to null
in between send and wait.
Now in this process I also rename error_wait to dropouts.
Signed-
-off-by: Anand Jain
---
V2: Now the flush error return is saved and checked instead of the
checkpoint of the dev_stat method earlier.
fs/btrfs/disk-io.c | 32 ++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
We have already assigned q from bdev_get_queue() so use it.
And rearrange the code for better view.
Signed-off-by: Anand Jain
---
fs/btrfs/volumes.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1563ae03079b
, I rename the unused nobarrier member as flushable,
which the below patch made it redundant.
Per commit b25de9d6da49b1a8760a89672283128aa8c78345
block: remove BIO_EOPNOTSUPP
Signed-off-by: Anand Jain
---
v1:
This patch will replace
[PATCH] btrfs: delete unused member nobarriers
fs/btrfs
On 04/03/2017 08:06 PM, David Sterba wrote:
Please update the changelog to say why it's ok to remove it, eg. the
commit that removed the last user.
commit b25de9d6da49b1a8760a89672283128aa8c78345
Author: Christoph Hellwig
Date: Fri Apr 24 21:41:01 2015 +0200
block: remove BIO_EOPNOTSUP
The blkdev_issue_flush() will check if the write cache is enabled
before submitting the flush. This will add a code to fail fast if
its not.
Signed-off-by: Anand Jain
---
v1:
This patch will replace
[PATCH] btrfs: delete unused member nobarriers
v2:
- This patch will now _not_ replace the
ommit b25de9d6da49b1a8760a89672283128aa8c78345
block: remove BIO_EOPNOTSUPP
And, as the device/lun write cache state may change dynamically saving
such as state won't help either. So deleting the member nobarriers.
Signed-off-by: Anand Jain
---
v2: We need this patch. Update the commit log.
fs/btrfs/disk-io.c | 3 ---
fs/btrfs
-off-by: Anand Jain
---
v2: Address Qu review comments viz..
Add meaningful names, like cp_list (for checkpoint_list head).
(And actually it does not need a new struct type just to hold
the head pointer, list node is already named as device_checkpoint).
Check return value of
ey are -
[PATCH v4 5/7] btrfs: use q which is already obtained from bdev_get_queue
[PATCH v4 6/7] btrfs: delete unused member nobarriers
[PATCH v4 7/7] btrfs: check if the device is flush capable
Anand Jain (7):
btrfs: use blkdev_issue_flush to flush the device cache
btrfs: cleanup barrier_all
-off-by: Anand Jain
---
v2: Address Qu review comments viz..
Add meaningful names, like cp_list (for checkpoint_list head).
(And actually it does not need a new struct type just to hold
the head pointer, list node is already named as device_checkpoint).
Check return value of
As of now we do alloc an empty bio and then use the flag REQ_PREFLUSH
to flush the device cache, instead we can use blkdev_issue_flush()
for this puspose.
Also now no need to check the return when write_dev_flush() is called
with wait = 0
Signed-off-by: Anand Jain
---
v2: Title of this patch is
The blkdev_issue_flush() will check if the write cache is enabled
before submitting the flush. This will add a code to fail fast if
its not.
Signed-off-by: Anand Jain
---
v2: This patch will now _not_ replace the below patch and this patch
should be applied on top of it.
[PATCH] btrfs
78345
block: remove BIO_EOPNOTSUPP
And, as the device/lun write cache state may change dynamically saving
such as state won't help either. So deleting the member nobarriers.
Signed-off-by: Anand Jain
---
v2: add commit log. ref of last consumer.
v3: nochange
v4: nochange
fs/btrfs/disk-io.c |
owever I still kept
bdev == NULL counted towards error device in view of future
enhancements. And as the device_list_mutex is held when
barrier_all_devices() is called, I don't expect a new bdev to null
in between send and wait.
Now in this process I also rename error_wait to dropouts.
Signed-
REQ_PREFLUSH bio to flush dev cache uses btrfs_end_empty_barrier()
completion callback only, as of now, and there it accounts for dev
stat flush errors BTRFS_DEV_STAT_FLUSH_ERRS, so remove it from the
btrfs_end_bio().
Signed-off-by: Anand Jain
---
v2-3: no change
v4: no change, but now the patch
We have already assigned q from bdev_get_queue() so use it.
And rearrange the code for better view.
Signed-off-by: Anand Jain
Reviewed-by: David Sterba
---
v2-4: no change
fs/btrfs/volumes.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs
Hi David,
Just want to bring this patch to your notice. It fixes all
the previously commented issues.
Thanks, Anand
On 04/06/2017 11:22 AM, Anand Jain wrote:
These patches adds cleanup of device barrier, q and flush codes.
This was needed for the following reasons..
- First of all, Qu
On 04/14/2017 02:41 AM, Liu Bo wrote:
On Thu, Apr 06, 2017 at 11:22:47AM +0800, Anand Jain wrote:
As of now we do alloc an empty bio and then use the flag REQ_PREFLUSH
to flush the device cache, instead we can use blkdev_issue_flush()
for this puspose.
Also now no need to check the return
On 04/18/2017 09:54 PM, David Sterba wrote:
On Thu, Apr 06, 2017 at 11:22:47AM +0800, Anand Jain wrote:
As of now we do alloc an empty bio and then use the flag REQ_PREFLUSH
to flush the device cache, instead we can use blkdev_issue_flush()
for this puspose.
This would change the scheduling
This adds comments to the flush error handling part of
the code, and hopes to maintain the same logic with a
framework which can be used to handle the errors at the
volume level.
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 58 ++
fs
David,
Based on the comments received, I have to pull back patch 1/7 to 3/7
and instead have replaced them with a patch as below.
[patch] btrfs: add framework to handle device flush error as a volume
Thanks, Anand
On 04/19/2017 12:29 PM, Anand Jain wrote:
On 04/18/2017 09:54 PM
My question is, what does it do then when a new modification-write comes
in to the compressed no-cow file, and the modification isn't as
compressible as the data it replaced?
If any extent that is attempted to compress is found not compressible
then it would mark inode as no-compress. Then i
, however the prealloc itself has to optimized based on the
barrier option. So in the long run I don't think below ENOMEM would remain.)
Thanks, Anand
On 04/25/2017 04:58 PM, Anand Jain wrote:
This adds comments to the flush error handling part of
the code, and hopes to maintain the same
-
This patch fixes the above issue, by checking the if the passed
options are only subvol or subvolid in the subsequent mount.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 40
1 file changed, 40 insertions(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs
On 04/29/2017 01:26 PM, Andrei Borzenkov wrote:
28.04.2017 12:14, Anand Jain пишет:
We allow recursive mounts with subvol options such as [1]
[1]
mount -o rw,compress=lzo /dev/sdc /btrfs1
mount -o ro,subvol=sv2 /dev/sdc /btrfs2
And except for the btrfs-specific subvol and subvolid options
ther, but looks like this patchset suddenly got forgotten.
It still applies to 4.11 but I'm afraid it won't after 4.12 merge
window. Any update on it?
Just waiting for the flush error rework from Anand Jain.
There were quite a number of trials on the btrfs dev flush to get
that cor
On 04/30/2017 01:47 PM, Andrei Borzenkov wrote:
I'm chasing issue with btrfs mounts under systemd
(https://github.com/systemd/systemd/issues/5781) - to summarize, systemd
waits for the final device that makes btrfs complete and mounts it using
this device name.
But in /proc/self/mountinfo
From: Anand Jain
This patch provides helper functions to force a device to offline
or failed, and we need this device states for the following reasons,
1) a. it can be reported that device has failed when it does
b. close the device when it goes offline so that blocklayer can
cleanup
2
From: Anand Jain
Write and Flush errors are considered as critical errors,
upon which the device will be brought offline and marked as
failed. Write and Flush errors are identified using device
error statistics. This is monitored using a kthread
btrfs_health.
Signed-off-by: Anand Jain
---
V7
run dmsetup suspend dm-sdd
run "dmsetup load dm-sdd --table '$dmerror_table'"
run dmsetup resume dm-sdd
run "dd if=/dev/zero of=/btrfs/tf1 bs=4096 count=100 > /dev/null 2>&1"
run sleep 32
run btrfs fi show -m /btrfs
te: Tue, 8 Nov 2016 20:42:50 +0800
From: Anand Jain
To: dste...@suse.cz
CC: linux-btrfs@vger.kernel.org
David,
Any comments on this patch ?
It would need rebase though, I shall do it based on your inputs.
sysfs was most challenging to get correct. (There are defunct procfs
and ioctl based
On 05/03/2017 11:31 PM, Austin S. Hemmelgarn wrote:
On 2017-05-03 09:34, Anand Jain wrote:
As the below two patches are about managing the failed disk,
I have separated them from the spare disk and auto replace
support patch set which was sent before here [1]..
[1] https://lwn.net
e use.
Signed-off-by: Anand Jain
cc: quwen...@cn.fujitsu.com
---
include/trace/events/btrfs.h | 36
1 file changed, 36 deletions(-)
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index a3c3cab643a9..5471f9b4dc9e 100644
--- a/include/trace/e
Commit 81fb6f77a026 (btrfs: qgroup: Add new trace point for
qgroup data reserve) added the following events which aren't used.
btrfs__qgroup_data_map
btrfs_qgroup_init_data_rsv_map
btrfs_qgroup_free_data_rsv_map
So remove them.
Signed-off-by: Anand Jain
cc: quwen...@cn.fujits
@@ -3566,6 +3570,33 @@ static int write_dev_flush(struct btrfs_device *device,
int wait)
return 0;
}
+static int check_barrier_error(struct btrfs_fs_devices *fsdevs)
+{
+ int submit_flush_error = 0;
+ int dev_flush_error = 0;
+ struct btrfs_device *dev;
+
+
This adds comments to the flush error handling part of
the code, and hopes to maintain the same logic with a
framework which can be used to handle the errors at the
volume level.
Signed-off-by: Anand Jain
---
v2:
fix -ENOMEM at two places
add code readability changes in check_barrier_error
By looking at the logs we should be able to know when the FS was
mounted and unmounted and the options used, so to help forensic
investigations.
Signed-off-by: Anand Jain
---
fs/btrfs/super.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs
h function 'blkdev_issue_flush()', however it uses submit_bio()
instead of submit_bio_wait().
This patch is for review comments, will send out a final patch based
on the comments received.
Thanks, Anand
Anand Jain (2):
block: Introduce blkdev_issue_flush_no_wait()
btrfs: Use blkdev_issue_flush_n
stead of submit_bio_wait(), and accepts the
completion function and data from the caller.
Signed-off-by: Anand Jain
---
block/blk-flush.c | 47 +++
include/linux/blkdev.h | 8
2 files changed, 55 insertions(+)
diff --git a/block/blk-flus
Signed-off-by: Anand Jain
---
fs/btrfs/disk-io.c | 108 -
fs/btrfs/volumes.h | 2 +-
2 files changed, 33 insertions(+), 77 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8685d67185d0..f059f9bdbbd7 100644
--- a/fs
On 05/10/2017 01:12 AM, David Sterba wrote:
On Sat, May 06, 2017 at 07:17:54AM +0800, Anand Jain wrote:
This adds comments to the flush error handling part of
the code, and hopes to maintain the same logic with a
framework which can be used to handle the errors at the
volume level.
Signed
On 05/16/2017 10:07 PM, Bart Van Assche wrote:
On Tue, 2017-05-16 at 17:39 +0800, Anand Jain wrote:
BTRFS wanted a block device flush function which does not wait for
its completion, so that the flush for the next device can be called
in the same thread.
Here is a RFC patch to provide the
On 05/18/2017 01:14 AM, David Sterba wrote:
On Tue, May 16, 2017 at 02:07:23PM +, Bart Van Assche wrote:
On Tue, 2017-05-16 at 17:39 +0800, Anand Jain wrote:
BTRFS wanted a block device flush function which does not wait for
its completion, so that the flush for the next device can be
On 05/16/2017 07:56 PM, Christoph Hellwig wrote:
On Tue, May 16, 2017 at 05:39:13PM +0800, Anand Jain wrote:
blkdev_issue_flush() is a blocking function and returns only after
the flush bio is completed, so a module handling more than one
device can't issue flush for all the devices unle
that changes if received confirmed
objection.
Thanks. Anand
Thanks,
Qu
At 05/16/2017 04:41 PM, Anand Jain wrote:
By looking at the logs we should be able to know when the FS was
mounted and unmounted and the options used, so to help forensic
investigations.
Signed-off-by: Anand Jain
---
By looking at the logs we should be able to know when was the FS
mounted and unmounted and the options used, so to help forensic
investigations.
Signed-off-by: Anand Jain
---
You may want to know that, during boot and shutdown this
adds roughly 25 lines more logs depending on the config, and it
On 05/16/2017 07:23 PM, David Sterba wrote:
On Tue, May 16, 2017 at 04:41:49PM +0800, Anand Jain wrote:
By looking at the logs we should be able to know when the FS was
mounted and unmounted and the options used, so to help forensic
investigations.
Could be a useful feature, but you
On 05/18/2017 08:23 PM, Carlos Maiolino wrote:
On Thu, May 18, 2017 at 06:08:04PM +0800, Anand Jain wrote:
By looking at the logs we should be able to know when was the FS
mounted and unmounted and the options used, so to help forensic
investigations.
Signed-off-by: Anand Jain
---
You may
On 05/19/2017 01:39 AM, Darrick J. Wong wrote:
On Thu, May 18, 2017 at 06:08:04PM +0800, Anand Jain wrote:
By looking at the logs we should be able to know when was the FS
mounted and unmounted and the options used, so to help forensic
investigations.
Signed-off-by: Anand Jain
---
You may
Instead of sending each argument of struct compressed_bio, send
the compressed_bio itself.
Also by having struct compressed_bio in btrfs_decompress_bio()
it would help tracing.
Signed-off-by: Anand Jain
---
This patch is preparatory for the up coming patch
btrfs: add compression trace points
This patch adds compression and decompression trace points for the
purpose of debugging.
Signed-off-by: Anand Jain
---
Note:
I have used same trace function for both compress and decompress
as I wanted to maintain compress and decompress debug data aligned.
fs/btrfs/compression.c | 10
By looking at the logs we should be able to know when was the FS
mounted and unmounted and the options used, so to help forensic
investigations.
Signed-off-by: Anand Jain
---
v2:
. Colin pointed out that when docker runs, this patch will create
messages which can be called as too chatty. In v2 I
Thanks for the comments.
On 05/19/2017 11:01 PM, Theodore Ts'o wrote:
On Fri, May 19, 2017 at 08:17:55AM +0800, Anand Jain wrote:
XFS already logs its own unmounts.
Nice. as far as I know its only in XFS.
Ext4 logs mounts, but not unmounts.
I prefer to let each filesystem log
it
Thanks for comments.
But that said, I find the log spam today from e.g. docker + devicemapper + xfs
annoying, and switching to overlay2 fixed that as a side effect which is nice.
Having overlay2 log would reintroduce that problem.
You are right, docker with overlay2 logs additional 6 lines du
The bdev->bd_disk, !bdev_get_queue and q->make_request_fn checks
are all things you don't need, any blkdev_issue_flush should not
either, although I'll need to look into the weird loop workaround
again, which doesn't make much sense to me.
I tried to confirm q->make_request_fn and got lost, I
David,
Can I ping you on this patch ? Wonder if there is any concern.
Thanks, Anand
On 04/28/2017 05:14 PM, Anand Jain wrote:
We allow recursive mounts with subvol options such as [1]
[1]
mount -o rw,compress=lzo /dev/sdc /btrfs1
mount -o ro,subvol=sv2 /dev/sdc /btrfs2
And except for
This patch adds compression and decompression trace points for the
purpose of debugging.
Signed-off-by: Anand Jain
---
v2: no change
fs/btrfs/compression.c | 10 ++
include/trace/events/btrfs.h | 36
2 files changed, 46 insertions(+)
diff
struct compressed_bio pointer can be used instead.
Signed-off-by: Anand Jain
---
v2: added this patch
fs/btrfs/compression.c | 43 +--
fs/btrfs/compression.h | 44
fs/btrfs/lzo.c | 10 +-
fs
Instead of sending each argument of struct compressed_bio, send
the compressed_bio itself.
Also by having struct compressed_bio in btrfs_decompress_bio()
it would help tracing.
Signed-off-by: Anand Jain
---
v2: no changes
fs/btrfs/compression.c | 23 +--
1 file changed, 9
Patch 1 and 2 are preparatory and clean up patches, and patch 3 adds
the trace point for the compression.
I have used same trace function for both compress and decompress
as I wanted to maintain compress and decompress debug data aligned
v2: added patch #2
Anand Jain (3):
btrfs
Can you take this idea one notch further and refactor also
zlib_decompress_bio and lzo_decompress_bio functions as well?
Done. Added in v2.
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majo
Reviewed-by: Nikolay Borisov
Thanks.
Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05/27/2017 02:08 AM, David Sterba wrote:
On Fri, May 26, 2017 at 03:45:00PM +0800, Anand Jain wrote:
This patch adds compression and decompression trace points for the
purpose of debugging.
Signed-off-by: Anand Jain
---
v2: no change
fs/btrfs/compression.c | 10 ++
include
:
https://github.com/0day-ci/linux/commits/Anand-Jain/compression-ops-args-clean-up-and-trace-point/20170526-184159
config: s390-default_defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget
https://raw.githubusercontent.com/01org/lkp-tests
Signed-off-by: Anand Jain
---
Hi David,
I note the original patch [1] is already queued so here I am sending
a fix-up patch can you pls squash this to [1]
[1]
[PATCH 2/3 v2] btrfs: reduce arguments for decompress_bio ops
This fixup patch, fixes issues reported by kbuild test robot which
lockup when alloc_workspace -> vmalloc would silently
use the GFP_KERNEL, add the memalloc_nofs helpers around the critical
call site.
Reviewed-by: Anand Jain
Thanks, Anand
Signed-off-by: David Sterba
---
fs/btrfs/compression.c | 10 ++
1 file changed, 10 insertions(+)
diff --gi
On 05/31/17 23:41, David Sterba wrote:
As alloc_workspace is now protected by memalloc_nofs where needed,
we can switch the kmalloc to use GFP_KERNEL.
Signed-off-by: David Sterba
Reviewed-by: Anand Jain
Thanks, Anand
---
fs/btrfs/lzo.c | 2 +-
fs/btrfs/zlib.c | 4 ++--
2 files
@@ -59,7 +59,7 @@ static struct list_head *zlib_alloc_workspace(void)
workspacesize = max(zlib_deflate_workspacesize(MAX_WBITS,
MAX_MEM_LEVEL),
zlib_inflate_workspacesize());
- workspace->strm.workspace = vmalloc(workspacesize);
+ workspace->strm.wo
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index e8185c83f667..924b1d941b53 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -6389,13 +6389,10 @@ long btrfs_ioctl_send(struct file *mnt_file, void
__user *arg_)
alloc_size = sizeof(struct clone_root) * (arg->clone_sources_coun
On 06/01/17 01:49, David Sterba wrote:
We use a growing buffer for xattrs larger than a page size, at some
point vmalloc is unconditionally used for larger buffers. We can still
try to avoid it using the kvmalloc helper.
Reviewed-by: Anand Jain
Signed-off-by: David Sterba
---
fs/btrfs
GFP_KERNEL and might
deadlock in some cases
* keep the context constraint of GFP_NOFS, used by scrub
* we want to use GFP_KERNEL unconditionally inside init_ipath or its
callees
Reviewed-by: Anand Jain
Thanks, Anand
Signed-off-by: David Sterba
---
fs/btrfs/scrub.c | 9 +
1 file
1 - 100 of 1556 matches
Mail list logo