Re: [PATCH 2/2] btrfs: extent-tree: Ensure btrfs_trim_fs can trim the whole fs

2017-11-20 Thread Nikolay Borisov
On 21.11.2017 09:21, Qu Wenruo wrote: > [BUG] > fstrim on some btrfs only trims the unallocated space, not trimming any > space in existing block groups. > > [CAUSE] > fstrim_range passed in by default fstrim will be: > > range->start = 0 > range->len = fs_size (which equals with super->total_b

Re: [PATCH] btrfs: extent-tree: Use round up to replace align macro

2017-11-20 Thread Nikolay Borisov
On 21.11.2017 07:54, Qu Wenruo wrote: > To save reader seconds before checking if it's rounding up or down. > > Signed-off-by: Qu Wenruo > --- > fs/btrfs/extent-tree.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-

[PATCH 2/2] btrfs: extent-tree: Ensure btrfs_trim_fs can trim the whole fs

2017-11-20 Thread Qu Wenruo
[BUG] fstrim on some btrfs only trims the unallocated space, not trimming any space in existing block groups. [CAUSE] fstrim_range passed in by default fstrim will be: range->start = 0 range->len = fs_size (which equals with super->total_bytes) range->min_len = 512 However btrfs_trim_fs() follow

[PATCH v2 1/2] btrfs: Enhance btrfs_trim_fs function to handle error better

2017-11-20 Thread Qu Wenruo
Function btrfs_trim_fs() doesn't handle errors in a consistent way, if error happens when trimming existing block groups, it will skip the remaining blocks and continue to trim unallocated space for each device. And the return value will only reflect the final error from device trimming. This pat

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Dave Chinner
On Mon, Nov 20, 2017 at 08:32:40PM -0800, Matthew Wilcox wrote: > On Mon, Nov 20, 2017 at 05:37:53PM -0800, Darrick J. Wong wrote: > > On Tue, Nov 21, 2017 at 09:27:49AM +1100, Dave Chinner wrote: > > > First thing I noticed was that "xa" as a prefix is already quite > > > widely used in XFS - it's

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 13:58, Chris Murphy wrote: > On Mon, Nov 20, 2017 at 9:58 PM, Qu Wenruo wrote: >> >> >> On 2017年11月21日 12:49, Chris Murphy wrote: >>> On Mon, Nov 20, 2017 at 9:43 PM, Qu Wenruo wrote: > > Apply in addition to previous patch? Or apply to clean v4.14? On

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 9:58 PM, Qu Wenruo wrote: > > > On 2017年11月21日 12:49, Chris Murphy wrote: >> On Mon, Nov 20, 2017 at 9:43 PM, Qu Wenruo wrote: >>> >>> Apply in addition to previous patch? Or apply to clean v4.14? >>> >>> On previous patch. >> >> Refuses to apply with or without

[PATCH] btrfs: extent-tree: Use round up to replace align macro

2017-11-20 Thread Qu Wenruo
To save reader seconds before checking if it's rounding up or down. Signed-off-by: Qu Wenruo --- fs/btrfs/extent-tree.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 309a109069f1..8ab18e25cb91 100644 --- a/fs/

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 12:49, Chris Murphy wrote: > On Mon, Nov 20, 2017 at 9:43 PM, Qu Wenruo wrote: >> >> >>> >>> Apply in addition to previous patch? Or apply to clean v4.14? >> >> On previous patch. > > Refuses to apply with or without previous patch. > > $ git apply -v ~/qufstrim3.patch > Checkin

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 9:43 PM, Qu Wenruo wrote: > > > On 2017年11月21日 12:34, Chris Murphy wrote: >> On Mon, Nov 20, 2017 at 9:29 PM, Qu Wenruo wrote: >>> >>> >>> On 2017年11月21日 12:06, Chris Murphy wrote: On Mon, Nov 20, 2017 at 6:16 PM, Qu Wenruo wrote: > > > On 2017年11月21日 06:

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 9:43 PM, Qu Wenruo wrote: > > And BTW, according to your sysfs discard output, it seems that you're > using Intel 600P 256G NVME ssd, which I'm also using. No. 'nvme list' shows it as: SAMSUNG MZVLV256HCHP-000H1 And lscpi shows it as: 6d:00.0 Non-Volatile memory controll

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 12:34, Chris Murphy wrote: > On Mon, Nov 20, 2017 at 9:29 PM, Qu Wenruo wrote: >> >> >> On 2017年11月21日 12:06, Chris Murphy wrote: >>> On Mon, Nov 20, 2017 at 6:16 PM, Qu Wenruo wrote: On 2017年11月21日 06:23, Chris Murphy wrote: > On Sun, Nov 19, 2017 at 7:42 PM,

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 9:29 PM, Qu Wenruo wrote: > > > On 2017年11月21日 12:06, Chris Murphy wrote: >> On Mon, Nov 20, 2017 at 6:16 PM, Qu Wenruo wrote: >>> >>> >>> On 2017年11月21日 06:23, Chris Murphy wrote: On Sun, Nov 19, 2017 at 7:42 PM, Qu Wenruo wrote: > > > On 2017年11月20日 10:

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Matthew Wilcox
On Mon, Nov 20, 2017 at 05:37:53PM -0800, Darrick J. Wong wrote: > On Tue, Nov 21, 2017 at 09:27:49AM +1100, Dave Chinner wrote: > > First thing I noticed was that "xa" as a prefix is already quite > > widely used in XFS - it's shorthand for "XFS AIL". Indeed, xa_lock > > already exists and is quit

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 12:06, Chris Murphy wrote: > On Mon, Nov 20, 2017 at 6:16 PM, Qu Wenruo wrote: >> >> >> On 2017年11月21日 06:23, Chris Murphy wrote: >>> On Sun, Nov 19, 2017 at 7:42 PM, Qu Wenruo wrote: On 2017年11月20日 10:24, Chris Murphy wrote: > On Sun, Nov 19, 2017 at 7:13 PM,

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 9:13 PM, Jeff Mahoney wrote: > On 11/20/17 11:04 PM, Chris Murphy wrote: >> On Mon, Nov 20, 2017 at 6:46 PM, Jeff Mahoney wrote: >>> On 11/20/17 5:59 PM, Chris Murphy wrote: On Mon, Nov 20, 2017 at 1:40 PM, Jeff Mahoney wrote: > On 11/20/17 3:01 PM, Jeff Mahoney

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Jeff Mahoney
On 11/20/17 11:04 PM, Chris Murphy wrote: > On Mon, Nov 20, 2017 at 6:46 PM, Jeff Mahoney wrote: >> On 11/20/17 5:59 PM, Chris Murphy wrote: >>> On Mon, Nov 20, 2017 at 1:40 PM, Jeff Mahoney wrote: On 11/20/17 3:01 PM, Jeff Mahoney wrote: > On 11/20/17 3:00 PM, Jeff Mahoney wrote: >>

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
Do I need btrfs debug stuff enabled for this patch to work? $ grep -i btrfs /home/chris/linux/.config CONFIG_BTRFS_FS=m CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set # CONFIG_BTRFS_DEBUG is not set # CONFIG_BTRFS_ASSERT is no

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 6:16 PM, Qu Wenruo wrote: > > > On 2017年11月21日 06:23, Chris Murphy wrote: >> On Sun, Nov 19, 2017 at 7:42 PM, Qu Wenruo wrote: >>> >>> >>> On 2017年11月20日 10:24, Chris Murphy wrote: On Sun, Nov 19, 2017 at 7:13 PM, Qu Wenruo wrote: > > > On 2017年11月19日 14:

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 6:46 PM, Jeff Mahoney wrote: > On 11/20/17 5:59 PM, Chris Murphy wrote: >> On Mon, Nov 20, 2017 at 1:40 PM, Jeff Mahoney wrote: >>> On 11/20/17 3:01 PM, Jeff Mahoney wrote: On 11/20/17 3:00 PM, Jeff Mahoney wrote: > On 11/19/17 4:38 PM, Chris Murphy wrote: >>

Re: [dm-devel] Ideas to reuse filesystem's checksum to enhance dm-raid1/10/5/6?

2017-11-20 Thread Theodore Ts'o
On Thu, Nov 16, 2017 at 03:32:05PM -0700, Chris Murphy wrote: > > XFS by default does metadata csums. But ext4 doesn't use it for either > metadata or the journal by default still, it is still optional. So for > now it mainly benefits XFS. Metadata checksums are enabled by default in the version

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Jeff Mahoney
On 11/20/17 5:59 PM, Chris Murphy wrote: > On Mon, Nov 20, 2017 at 1:40 PM, Jeff Mahoney wrote: >> On 11/20/17 3:01 PM, Jeff Mahoney wrote: >>> On 11/20/17 3:00 PM, Jeff Mahoney wrote: On 11/19/17 4:38 PM, Chris Murphy wrote: > On Sat, Nov 18, 2017 at 11:27 PM, Andrei Borzenkov > wr

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Darrick J. Wong
On Tue, Nov 21, 2017 at 09:27:49AM +1100, Dave Chinner wrote: > On Mon, Nov 20, 2017 at 01:51:00PM -0800, Matthew Wilcox wrote: > > On Tue, Nov 21, 2017 at 07:26:06AM +1100, Dave Chinner wrote: > > > On Mon, Nov 20, 2017 at 08:18:29AM -0800, Matthew Wilcox wrote: > > > > On Fri, Nov 17, 2017 at 11:

Re: test btrfs scrubbing/get system's total capacity

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 00:50, ST wrote: > Hello, > > 1. is there a tool that I can use to test btrfs scrubbing? Namely I need > to "damage" a file, i.e. change it without changing its meta > information, so I can see how scrubbing performs... Is there something > like this? Btrfs-corrupt-block, which i

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 06:23, Chris Murphy wrote: > On Sun, Nov 19, 2017 at 7:42 PM, Qu Wenruo wrote: >> >> >> On 2017年11月20日 10:24, Chris Murphy wrote: >>> On Sun, Nov 19, 2017 at 7:13 PM, Qu Wenruo wrote: On 2017年11月19日 14:17, Chris Murphy wrote: > fstrim should trim free space, bu

Re: [PATCH] btrfs: Enhance btrfs_trim_fs function to handle error better

2017-11-20 Thread Qu Wenruo
On 2017年11月21日 01:51, David Sterba wrote: > On Mon, Nov 20, 2017 at 01:56:51PM +0800, Qu Wenruo wrote: >> Function btrfs_trim_fs() doesn't handle errors in a consistent way, if >> error happens when trimming existing block groups, it will skip the >> remaining blocks and continue to trim unalloca

Re: Issues while doing btrfs delete missing in raid6

2017-11-20 Thread Jérôme Carretero
Hi Duncan, On Mon, 20 Nov 2017 21:57:47 + (UTC) Duncan <1i5t5.dun...@cox.net> wrote: > Jérôme Carretero posted on Mon, 20 Nov 2017 01:43:44 -0500 as > excerpted: > > > While doing a test (to evaluate drives), where I'm filling a bunch > > of drives in RAID6, one of the disks failed in the pr

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 1:40 PM, Jeff Mahoney wrote: > On 11/20/17 3:01 PM, Jeff Mahoney wrote: >> On 11/20/17 3:00 PM, Jeff Mahoney wrote: >>> On 11/19/17 4:38 PM, Chris Murphy wrote: On Sat, Nov 18, 2017 at 11:27 PM, Andrei Borzenkov wrote: > 19.11.2017 09:17, Chris Murphy пишет:

Re: test btrfs scrubbing/get system's total capacity

2017-11-20 Thread Duncan
ST posted on Mon, 20 Nov 2017 18:50:26 +0200 as excerpted: > [...] to set btrfs quota on a /home subvolume as say > 0.8*TotalCapacityOfRoot and then assign to it individual users' > subvolumes with certain (smaller) quatos. On the narrow subject of btrfs quotas... Just be sure you're aware of th

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Dave Chinner
On Mon, Nov 20, 2017 at 01:51:00PM -0800, Matthew Wilcox wrote: > On Tue, Nov 21, 2017 at 07:26:06AM +1100, Dave Chinner wrote: > > On Mon, Nov 20, 2017 at 08:18:29AM -0800, Matthew Wilcox wrote: > > > On Fri, Nov 17, 2017 at 11:39:25AM -0800, Darrick J. Wong wrote: > > > > If two programs simultan

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Sun, Nov 19, 2017 at 7:42 PM, Qu Wenruo wrote: > > > On 2017年11月20日 10:24, Chris Murphy wrote: >> On Sun, Nov 19, 2017 at 7:13 PM, Qu Wenruo wrote: >>> >>> >>> On 2017年11月19日 14:17, Chris Murphy wrote: fstrim should trim free space, but it only trims unallocated. This is with kernel

Re: Issues while doing btrfs delete missing in raid6

2017-11-20 Thread Duncan
Jérôme Carretero posted on Mon, 20 Nov 2017 01:43:44 -0500 as excerpted: > While doing a test (to evaluate drives), where I'm filling a bunch of > drives in RAID6, one of the disks failed in the process. > (System with v4.14 / ECC). FWIW, see raid56 status in the status page (table and below raid

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 1:40 PM, Jeff Mahoney wrote: > On 11/20/17 3:01 PM, Jeff Mahoney wrote: >> On 11/20/17 3:00 PM, Jeff Mahoney wrote: >>> On 11/19/17 4:38 PM, Chris Murphy wrote: On Sat, Nov 18, 2017 at 11:27 PM, Andrei Borzenkov wrote: > 19.11.2017 09:17, Chris Murphy пишет:

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Matthew Wilcox
On Tue, Nov 21, 2017 at 07:26:06AM +1100, Dave Chinner wrote: > On Mon, Nov 20, 2017 at 08:18:29AM -0800, Matthew Wilcox wrote: > > On Fri, Nov 17, 2017 at 11:39:25AM -0800, Darrick J. Wong wrote: > > > If two programs simultaneously try to write to the same part of a file > > > via direct IO and b

Re: [PATCH v2] btrfs: handle dynamically reappearing missing device

2017-11-20 Thread Anand Jain
On 11/21/2017 03:28 AM, Goffredo Baroncelli wrote: On 11/20/2017 09:19 AM, Anand Jain wrote: On 11/18/2017 09:52 PM, Goffredo Baroncelli wrote: On 11/17/2017 01:36 PM, Anand Jain wrote: If the device is not present at the time of (-o degrade) mount, the mount context will create a dummy mi

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Jeff Mahoney
On 11/20/17 3:01 PM, Jeff Mahoney wrote: > On 11/20/17 3:00 PM, Jeff Mahoney wrote: >> On 11/19/17 4:38 PM, Chris Murphy wrote: >>> On Sat, Nov 18, 2017 at 11:27 PM, Andrei Borzenkov >>> wrote: 19.11.2017 09:17, Chris Murphy пишет: > fstrim should trim free space, but it only trims unall

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Dave Chinner
On Mon, Nov 20, 2017 at 08:18:29AM -0800, Matthew Wilcox wrote: > On Fri, Nov 17, 2017 at 11:39:25AM -0800, Darrick J. Wong wrote: > > If two programs simultaneously try to write to the same part of a file > > via direct IO and buffered IO, there's a chance that the post-diowrite > > pagecache inva

[PATCH 0/3] btrfs: some code cleanup and documentation

2017-11-20 Thread Edmund Nadolski
This series adds a bit of code cleanup and some documentation in the form of comments. No operational change. Edmund Nadolski (3): btrfs: btrfs_inode_log_parent should use defined inode_only values. btrfs: update some code documentation btrfs: remove dead code from btrfs_get_extent fs/btrf

[PATCH 2/3] btrfs: update some code documentation

2017-11-20 Thread Edmund Nadolski
Improve code documentation by adding/expanding comments in several places. Signed-off-by: Edmund Nadolski --- fs/btrfs/ctree.c| 31 +++--- fs/btrfs/ctree.h| 28 +++- fs/btrfs/extent_map.h | 58 -

[PATCH 1/3] btrfs: btrfs_inode_log_parent should use defined inode_only values.

2017-11-20 Thread Edmund Nadolski
Replace hardcoded numeric argument values for inode_only with the constants defined for that use. Signed-off-by: Edmund Nadolski --- fs/btrfs/tree-log.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1f79405..95cff91 100

[PATCH 3/3] btrfs: remove dead code from btrfs_get_extent

2017-11-20 Thread Edmund Nadolski
Due to new_inline logic, the create == 0 is always true at this point in the code, so the create != 0 branch can be removed. Signed-off-by: Edmund Nadolski --- fs/btrfs/inode.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/

Re: [PATCH 0/7] btrfs-progs: mkfs: Reword --rootdir

2017-11-20 Thread David Sterba
On Fri, Oct 20, 2017 at 09:59:00AM +0800, Qu Wenruo wrote: > Can be fetched from github: > https://github.com/adam900710/btrfs-progs/tree/mkfs_rootdir_rework > > And fetching from github is preferred method to test, as this patchset > has 2 prerequisite: > > 1) Minimal device size patchset >T

Re: bug? fstrim only trims unallocated space, not unused in bg's

2017-11-20 Thread Jeff Mahoney
On 11/20/17 3:00 PM, Jeff Mahoney wrote: > On 11/19/17 4:38 PM, Chris Murphy wrote: >> On Sat, Nov 18, 2017 at 11:27 PM, Andrei Borzenkov >> wrote: >>> 19.11.2017 09:17, Chris Murphy пишет: fstrim should trim free space, but it only trims unallocated. This is with kernel 4.14.0 and the

Re: uncorrectable errors in Raid 10

2017-11-20 Thread Roy Sigurd Karlsbakk
> On Sun, Nov 19, 2017 at 12:31 PM, Steffen Sindzinski > wrote: > >> [57830.611730] BTRFS warning (device sdc2): checksum/header error at logical >> 17478699876352 on dev /dev/sdd2, sector 338986176: metadata leaf (level 0) >> in tree 318 >> [57830.611732] BTRFS warning (device sdc2): checksum/h

Re: [PATCH v2] btrfs: handle dynamically reappearing missing device

2017-11-20 Thread Goffredo Baroncelli
On 11/20/2017 09:19 AM, Anand Jain wrote: > > > On 11/18/2017 09:52 PM, Goffredo Baroncelli wrote: >> On 11/17/2017 01:36 PM, Anand Jain wrote: >>> If the device is not present at the time of (-o degrade) mount, >>> the mount context will create a dummy missing struct btrfs_device. >>> Later this

Re: test btrfs scrubbing/get system's total capacity

2017-11-20 Thread Chris Murphy
On Mon, Nov 20, 2017 at 9:50 AM, ST wrote: > Hello, > > 1. is there a tool that I can use to test btrfs scrubbing? Namely I need > to "damage" a file, i.e. change it without changing its meta > information, so I can see how scrubbing performs... Is there something > like this? btrfs-corrupt-bloc

Re: [PATCH] Btrfs: fix list_add corruption and soft lockups in fsync

2017-11-20 Thread Liu Bo
On Mon, Nov 20, 2017 at 06:34:34PM +0100, David Sterba wrote: > On Mon, Nov 13, 2017 at 10:57:24AM -0700, Liu Bo wrote: > > Xfstests btrfs/146 revealed this corruption, > > > > [ 58.138831] Buffer I/O error on dev dm-0, logical block 2621424, async > > page read > > [ 58.151233] BTRFS error (

Re: [PATCH] btrfs-progs: ins: print c/o/s/r time of ROOT_ITEM

2017-11-20 Thread David Sterba
On Tue, Oct 31, 2017 at 01:58:04PM +0800, Qu Wenruo wrote: > > > On 2017年10月31日 13:40, Misono, Tomohiro wrote: > > Currently c/o/s/r time of ROOT_ITEM is not printed in print_root_item(). > > Fix this and print them if the values are not zero. print_timespec() > > is moved forward to reuse. > >

Re: [PATCH] btrfs: Enhance btrfs_trim_fs function to handle error better

2017-11-20 Thread David Sterba
On Mon, Nov 20, 2017 at 01:56:51PM +0800, Qu Wenruo wrote: > Function btrfs_trim_fs() doesn't handle errors in a consistent way, if > error happens when trimming existing block groups, it will skip the > remaining blocks and continue to trim unallocated space for each device. > > And the return va

Re: [PATCH] Btrfs: fix list_add corruption and soft lockups in fsync

2017-11-20 Thread David Sterba
On Mon, Nov 13, 2017 at 10:57:24AM -0700, Liu Bo wrote: > Xfstests btrfs/146 revealed this corruption, > > [ 58.138831] Buffer I/O error on dev dm-0, logical block 2621424, async > page read > [ 58.151233] BTRFS error (device sdf): bdev /dev/mapper/error-test errs: wr > 1, rd 0, flush 0, cor

Re: [PATCH] btrfs: fix deadlock when writing out space cache

2017-11-20 Thread David Sterba
On Wed, Nov 15, 2017 at 04:20:52PM -0500, Josef Bacik wrote: > From: Josef Bacik > > If we fail to prepare our pages for whatever reason (out of memory in > our case) we need to make sure to drop the block_group->data_rwsem, > otherwise hilarity ensues. > > Signed-off-by: Josef Bacik > --- > f

Re: [PATCH v2] Btrfs: set plug for fsync

2017-11-20 Thread David Sterba
On Wed, Nov 15, 2017 at 04:10:28PM -0700, Liu Bo wrote: > Setting plug can merge adjacent IOs before dispatching IOs to the disk > driver. > > Without plug, it'd not be a problem for single disk usecases, but for > multiple disks using raid profile, a large IO can be split to several > IOs of stri

Re: [PATCH] btrfs: move some zstd work data from stack to workspace

2017-11-20 Thread David Sterba
On Thu, Nov 16, 2017 at 01:07:19AM +, Nick Terrell wrote: > On 11/15/17, 9:30 AM, "David Sterba" wrote: > > * ZSTD_inBuffer in_buf > > * ZSTD_outBuffer out_buf > > > > are used in all functions to pass the compression parameters and the > > local variables consume some space. We can move them

test btrfs scrubbing/get system's total capacity

2017-11-20 Thread ST
Hello, 1. is there a tool that I can use to test btrfs scrubbing? Namely I need to "damage" a file, i.e. change it without changing its meta information, so I can see how scrubbing performs... Is there something like this? 2. I want to use Ansible to set btrfs quota on a /home subvolume as say 0

Re: [PATCH v2] iomap: report collisions between directio and buffered writes to userspace

2017-11-20 Thread Matthew Wilcox
On Fri, Nov 17, 2017 at 11:39:25AM -0800, Darrick J. Wong wrote: > If two programs simultaneously try to write to the same part of a file > via direct IO and buffered IO, there's a chance that the post-diowrite > pagecache invalidation will fail on the dirty page. When this happens, > the dio writ

Re: [PATCH 3/8] fs: btrfs: remove unused hardirq.h

2017-11-20 Thread David Sterba
On Sat, Nov 18, 2017 at 07:02:16AM +0800, Yang Shi wrote: > Preempt counter APIs have been split out, currently, hardirq.h just > includes irq_enter/exit APIs which are not used by btrfs at all. > > So, remove the unused hardirq.h. > > Signed-off-by: Yang Shi > Cc: Chris Mason > Cc: Josef Bacik

[josef-btrfs:bpf-override-return 1/4] kernel/kprobes.c:2345:2: error: implicit declaration of function 'populate_kernel_kprobe_ei_list'; did you mean 'module_unload_kprobe_ei_list'?

2017-11-20 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git bpf-override-return head: 9d789a052c0b5d31c2c3c0614b1450051508836c commit: effbb385b04345a1bf39542cebf435bc770c1776 [1/4] add infrastructure for tagging functions as error injectable config: sparc64-allyesconfig (attac

[josef-btrfs:bpf-override-return 1/4] kernel/kprobes.c:2345:2: error: implicit declaration of function 'populate_kernel_kprobe_ei_list'

2017-11-20 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git bpf-override-return head: 9d789a052c0b5d31c2c3c0614b1450051508836c commit: effbb385b04345a1bf39542cebf435bc770c1776 [1/4] add infrastructure for tagging functions as error injectable config: tile-allyesconfig (attached

[PATCH v3 2/2] btrfs: introduce feature to ignore a btrfs device

2017-11-20 Thread Anand Jain
Support for a new command is being added here: btrfs dev ignore Which shall undo the effects of the command btrfs dev scan This cli/ioctl is needed as there is no way to continue to mount in degraded mode if the device is already scanned, which is required to recover from the split brain raid

[PATCH v3 1/2] btrfs: add function to device list delete

2017-11-20 Thread Anand Jain
We need device delete from the dev_list so create a new function. New instead of refactor of btrfs_free_stale_device() because, btrfs_free_stale_device() doesn't hold device_list_mutex which is actually needed here. Signed-off-by: Anand Jain --- v1: title of this patch btrfs: refactor btrfs_fre

Re: [PATCH v2 1/2] btrfs: add function to device list delete

2017-11-20 Thread Anand Jain
Wrong ML. Pls ignore. Thanks, Anand On 11/18/2017 10:03 PM, Anand Jain wrote: We need device delete from the dev_list so create a new function, instead of refactor of btrfs_free_stale_device() because, btrfs_free_stale_device() doesn't hold device_list_mutex which is actually needed here.

Re: [PATCH 2/2] btrfs: introduce feature to ignore a btrfs device

2017-11-20 Thread Anand Jain
On 11/18/2017 10:28 PM, Nikolay Borisov wrote: On 18.11.2017 15:50, Anand Jain wrote: On 11/16/2017 10:11 PM, Nikolay Borisov wrote: On 13.11.2017 07:44, Anand Jain wrote: Support for a new command is being added here:   btrfs dev ignore Which shall undo the effects of the command  

Re: [PATCH v2] btrfs: handle dynamically reappearing missing device

2017-11-20 Thread Anand Jain
On 11/18/2017 09:52 PM, Goffredo Baroncelli wrote: On 11/17/2017 01:36 PM, Anand Jain wrote: If the device is not present at the time of (-o degrade) mount, the mount context will create a dummy missing struct btrfs_device. Later this device may reappear after the FS is mounted and then device