Re: RAID5 doesn't mount on boot, but you can afterwards?

2015-09-30 Thread Sjoerd
hi my fstab looks as follows (nb: i added the recovery option to see if that would help, which didn't) the bootdisk (and @home)is a ssd and the label STORAGE represents the RAID5 array: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for

[PATCH v5 6/9] vfs: Copy should use file_out rather than file_in

2015-09-30 Thread Anna Schumaker
The way to think about this is that the destination filesystem reads the data from the source file and processes it accordingly. This is especially important to avoid an infinate loop when doing a "server to server" copy on NFS. Signed-off-by: Anna Schumaker ---

[PATCH v5 3/9] btrfs: add .copy_file_range file operation

2015-09-30 Thread Anna Schumaker
From: Zach Brown This rearranges the existing COPY_RANGE ioctl implementation so that the .copy_file_range file operation can call the core loop that copies file data extent items. The extent copying loop is lifted up into its own function. It retains the core btrfs error

[PATCH v5 0/9] VFS: In-kernel copy system call

2015-09-30 Thread Anna Schumaker
Copy system calls came up during Plumbers a while ago, mostly because several filesystems (including NFS and XFS) are currently working on copy acceleration implementations. We haven't heard from Zach Brown in a while, so I volunteered to push his patches upstream so individual filesystems don't

[PATCH v5 2/9] x86: add sys_copy_file_range to syscall tables

2015-09-30 Thread Anna Schumaker
From: Zach Brown Add sys_copy_file_range to the x86 syscall tables. Signed-off-by: Zach Brown [Anna Schumaker: Update syscall number in syscall_32.tbl] Signed-off-by: Anna Schumaker --- arch/x86/entry/syscalls/syscall_32.tbl | 1 +

Re: RAID5 doesn't mount on boot, but you can afterwards?

2015-09-30 Thread Leonidas Spyropoulos
Hello, On 30/09/15, Sjoerd wrote: > Hi All, > > A RAID5 setup on raw devices doesn't want to automount on boot. > [..] Post your /etc/fstab file please. Thanks -- Sent using mutt -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

[PATCH] btrfs: fix resending received snapshot with parent

2015-09-30 Thread Robin Ruede
This fixes a regression introduced by 37b8d27d between v4.1 and v4.2. When a snapshot is received, its received_uuid is set to the original uuid of the subvolume. When that snapshot is then resent to a third filesystem, it's received_uuid is set to the second uuid instead of the original one. The

Re: [PATCH v2] fstests: generic: Check if a bull fallocate will change extent number

2015-09-30 Thread Duncan
Qu Wenruo posted on Tue, 29 Sep 2015 18:48:37 +0800 as excerpted: > Both gives quite good expression, I'll pick one of them. ... And for the one-line title, /bull/bad/ should do it. =:^) People wanting details about bad /how/ can look at the fuller description or source. -- Duncan - List

Re: [PATCH 1/2] btrfs: Fix lost-data-profile caused by auto removing bg

2015-09-30 Thread Filipe Manana
On Tue, Sep 29, 2015 at 2:51 PM, Zhao Lei wrote: > Reproduce: > (In integration-4.3 branch) > > TEST_DEV=(/dev/vdg /dev/vdh) > TEST_DIR=/mnt/tmp > > umount "$TEST_DEV" >/dev/null > mkfs.btrfs -f -d raid1 "${TEST_DEV[@]}" > > mount -o nospace_cache "$TEST_DEV"

Re: [PATCH] btrfs: fix a compiler warning of may be used uninitialized

2015-09-30 Thread Holger Hoffstätte
On 09/30/15 05:55, Zhao Lei wrote: >> count is defined iff add_to_ctl == true, so the patch is not necessary. And >> I'm >> not quite sure that 0 passed down to __btrfs_add_free_space as 'bytes' makes >> sense at all. > > Agree above all. > > So I write following description in changelog: >

RE: [PATCH 2/2] btrfs: Fix lost-data-profile caused by balance bg

2015-09-30 Thread Zhao Lei
Hi, Filipe Manana > -Original Message- > From: Filipe Manana [mailto:fdman...@gmail.com] > Sent: Wednesday, September 30, 2015 3:41 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re: [PATCH 2/2] btrfs: Fix lost-data-profile caused by balance bg >

[PATCH] fstests: btrfs: Check if fallocate re-truncates page beyond EOF

2015-09-30 Thread Qu Wenruo
Even the fallocate range doesn't cover the last page of a file, btrfs will still re-truncate the last page. Such behavior is completely duplicated and unneeded, and fixed by the following kernel patch: btrfs: Avoid truncate tailing page if fallocate range doesn't exceed inode size Add this test

Re: lots of snapshots, forcing defragmentation, and figuring out which files to defrag or nodatacow

2015-09-30 Thread Duncan
James Cook posted on Mon, 28 Sep 2015 22:51:05 -0700 as excerpted: > The context of these three questions is that I'm experiencing occasional > hangs for several seconds while btrfs-transacti works, and very long > boot times. General comments welcome. System info at bottom, > end part of

Re: [PATCH 2/2] btrfs: Fix lost-data-profile caused by balance bg

2015-09-30 Thread Filipe Manana
On Wed, Sep 30, 2015 at 5:20 AM, Zhao Lei wrote: > Hi, Filipe Manana > > Thanks for reviewing. > >> -Original Message- >> From: Filipe Manana [mailto:fdman...@gmail.com] >> Sent: Tuesday, September 29, 2015 11:48 PM >> To: Zhao Lei >> Cc:

Re: [PATCH v4 0/9] Btrfs: free space B-tree

2015-09-30 Thread Omar Sandoval
On Tue, Sep 29, 2015 at 08:50:29PM -0700, Omar Sandoval wrote: > Hi, > > Here's one more reroll of the free space B-tree patches, a more scalable > alternative to the free space cache. Minimal changes this time around, I > mainly wanted to resend this after Holger and I cleared up his bug >

[RFC PATCH] fstests: generic: Test that fsync works on file in overlayfs merged directory

2015-09-30 Thread Roman Lebedev
As per overlayfs documentation, any activity on a merged directory for a application that is doing such activity should work exactly as if that would be a normal, non overlayfs-merged directory. That is, e.g. simple fopen-fwrite-fsync-fclose sequence should work just fine. But apparently it does

kernel BUG when fsync'ing file in a overlayfs merged dir, located on btrfs

2015-09-30 Thread Roman Lebedev
Hello. My / is btrfs. To do some my local stuff more cleanly i wanted to use overlayfs, but it didn't quite work. Simple non-automatic sequence to reproduce the issue: mkdir lower upper work merged mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged vi merged/file

RE: [PATCH 1/2] btrfs: Fix lost-data-profile caused by auto removing bg

2015-09-30 Thread Zhao Lei
Hi, Filipe Manana > -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Filipe Manana > Sent: Wednesday, September 30, 2015 3:43 PM > To: Zhao Lei > Cc: linux-btrfs@vger.kernel.org > Subject: Re:

[PATCH v2 2/2] btrfs: Fix lost-data-profile caused by balance bg

2015-09-30 Thread Zhao Lei
Reproduce: (In integration-4.3 branch) TEST_DEV=(/dev/vdg /dev/vdh) TEST_DIR=/mnt/tmp umount "$TEST_DEV" >/dev/null mkfs.btrfs -f -d raid1 "${TEST_DEV[@]}" mount -o nospace_cache "$TEST_DEV" "$TEST_DIR" btrfs balance start -dusage=0 $TEST_DIR btrfs filesystem usage $TEST_DIR dd

[PATCH v2 1/2] btrfs: Fix lost-data-profile caused by auto removing bg

2015-09-30 Thread Zhao Lei
Reproduce: (In integration-4.3 branch) TEST_DEV=(/dev/vdg /dev/vdh) TEST_DIR=/mnt/tmp umount "$TEST_DEV" >/dev/null mkfs.btrfs -f -d raid1 "${TEST_DEV[@]}" mount -o nospace_cache "$TEST_DEV" "$TEST_DIR" umount "$TEST_DEV" mount -o nospace_cache "$TEST_DEV" "$TEST_DIR" btrfs filesystem

[PATCH V5 12/13] Btrfs: prepare_pages: Retry adding a page to the page cache

2015-09-30 Thread Chandan Rajendra
When reading the page from the disk, we can race with Direct I/O which can get the page lock (before prepare_uptodate_page() gets it) and can go ahead and invalidate the page. Hence if the page is not found in the inode's address space, retry the operation of getting a page. Signed-off-by:

[PATCH V5 07/13] Btrfs: Use (eb->start, seq) as search key for tree modification log

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize a page can map multiple extent buffers and hence using (page index, seq) as the search key is incorrect. For example, searching through tree modification log tree can return an entry associated with the first extent buffer mapped by the page (if such an entry exists), when

[PATCH V5 01/13] Btrfs: __btrfs_buffered_write: Reserve/release extents aligned to block size

2015-09-30 Thread Chandan Rajendra
Currently, the code reserves/releases extents in multiples of PAGE_CACHE_SIZE units. Fix this by doing reservation/releases in block size units. Signed-off-by: Chandan Rajendra --- fs/btrfs/file.c | 44 +++- 1 file changed, 31

[PATCH V5 05/13] Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize scenario, if i_size occurs in a block which is not the last block in the page, then the space to be reserved should be calculated appropriately. Reviewed-by: Liu Bo Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c |

[PATCH V5 13/13] Btrfs: Return valid delalloc range when the page does not have PG_Dirty flag set or has been invalidated

2015-09-30 Thread Chandan Rajendra
The following issue was observed when running generic/095 test on subpagesize-blocksize patchset. Assume that we are trying to write a dirty page that is mapping file offset range [159744, 163839]. writepage_delalloc() find_lock_delalloc_range(*start = 159744, *end = 0)

[PATCH V5 09/13] Btrfs: Limit inline extents to root->sectorsize

2015-09-30 Thread Chandan Rajendra
cow_file_range_inline() limits the size of an inline extent to PAGE_CACHE_SIZE. This breaks in subpagesize-blocksize scenarios. Fix this by comparing against root->sectorsize. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 2 +- 1 file changed, 1

[PATCH V5 08/13] Btrfs: btrfs_submit_direct_hook: Handle map_length < bio vector length

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize scenario, map_length can be less than the length of a bio vector. Such a condition may cause btrfs_submit_direct_hook() to submit a zero length bio. Fix this by comparing map_length against block size rather than with bv_len. Signed-off-by: Chandan Rajendra

[PATCH V5 04/13] Btrfs: fallocate: Work with sectorsized blocks

2015-09-30 Thread Chandan Rajendra
While at it, this commit changes btrfs_truncate_page() to truncate sectorsized blocks instead of pages. Hence the function has been renamed to btrfs_truncate_block(). Signed-off-by: Chandan Rajendra --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 47

[PATCH V5 02/13] Btrfs: Compute and look up csums based on sectorsized blocks

2015-09-30 Thread Chandan Rajendra
Checksums are applicable to sectorsize units. The current code uses bio->bv_len units to compute and look up checksums. This works on machines where sectorsize == PAGE_SIZE. This patch makes the checksum computation and look up code to work with sectorsize units. Reviewed-by: Liu Bo

[PATCH V5 03/13] Btrfs: Direct I/O read: Work on sectorsized blocks

2015-09-30 Thread Chandan Rajendra
The direct I/O read's endio and corresponding repair functions work on page sized blocks. This commit adds the ability for direct I/O read to work on subpagesized blocks. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 96

[PATCH V5 06/13] Btrfs: Search for all ordered extents that could span across a page

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize scenario it is not sufficient to search using the first byte of the page to make sure that there are no ordered extents present across the page. Fix this. Signed-off-by: Chandan Rajendra --- fs/btrfs/extent_io.c | 3 ++- fs/btrfs/inode.c

[PATCH V5 11/13] Btrfs: Clean pte corresponding to page straddling i_size

2015-09-30 Thread Chandan Rajendra
When extending a file by either "truncate up" or by writing beyond i_size, the page which had i_size needs to be marked "read only" so that future writes to the page via mmap interface causes btrfs_page_mkwrite() to be invoked. If not, a write performed after extending the file via the mmap

[RFC PATCH V4 09/13] Btrfs: Limit inline extents to root->sectorsize

2015-09-30 Thread Chandan Rajendra
cow_file_range_inline() limits the size of an inline extent to PAGE_CACHE_SIZE. This breaks in subpagesize-blocksize scenarios. Fix this by comparing against root->sectorsize. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 2 +- 1 file changed, 1

[RFC PATCH V4 03/13] Btrfs: Direct I/O read: Work on sectorsized blocks

2015-09-30 Thread Chandan Rajendra
The direct I/O read's endio and corresponding repair functions work on page sized blocks. This commit adds the ability for direct I/O read to work on subpagesized blocks. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 96

[RFC PATCH V4 05/13] Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize scenario, if i_size occurs in a block which is not the last block in the page, then the space to be reserved should be calculated appropriately. Reviewed-by: Liu Bo Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c |

Re: [PATCH 2/2] btrfs: Fix lost-data-profile caused by balance bg

2015-09-30 Thread Filipe Manana
On Wed, Sep 30, 2015 at 9:26 AM, Zhao Lei wrote: > Hi, Filipe Manana > >> -Original Message- >> From: Filipe Manana [mailto:fdman...@gmail.com] >> Sent: Wednesday, September 30, 2015 3:41 PM >> To: Zhao Lei >> Cc:

[RFC PATCH V4 10/13] Btrfs: Fix block size returned to user space

2015-09-30 Thread Chandan Rajendra
btrfs_getattr() returns PAGE_CACHE_SIZE as the block size. Since generic_fillattr() already does the right thing (by obtaining block size from inode->i_blkbits), just remove the statement from btrfs_getattr. Signed-off-by: Chandan Rajendra --- fs/btrfs/inode.c | 1 -

[RFC PATCH V4 08/13] Btrfs: btrfs_submit_direct_hook: Handle map_length < bio vector length

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize scenario, map_length can be less than the length of a bio vector. Such a condition may cause btrfs_submit_direct_hook() to submit a zero length bio. Fix this by comparing map_length against block size rather than with bv_len. Signed-off-by: Chandan Rajendra

[RFC PATCH V4 02/13] Btrfs: Compute and look up csums based on sectorsized blocks

2015-09-30 Thread Chandan Rajendra
Checksums are applicable to sectorsize units. The current code uses bio->bv_len units to compute and look up checksums. This works on machines where sectorsize == PAGE_SIZE. This patch makes the checksum computation and look up code to work with sectorsize units. Reviewed-by: Liu Bo

[RFC PATCH V4 00/13] Btrfs: Pre subpagesize-blocksize cleanups

2015-09-30 Thread Chandan Rajendra
The patches posted along with this cover letter are cleanups made during the developement of subpagesize-blocksize patchset. I believe that they can be integrated with the mainline kernel. Hence I have posted them separately from the subpagesize-blocksize patchset. I have testsed the patchset by

[RFC PATCH V4 11/13] Btrfs: Clean pte corresponding to page straddling i_size

2015-09-30 Thread Chandan Rajendra
When extending a file by either "truncate up" or by writing beyond i_size, the page which had i_size needs to be marked "read only" so that future writes to the page via mmap interface causes btrfs_page_mkwrite() to be invoked. If not, a write performed after extending the file via the mmap

[RFC PATCH V4 13/13] Btrfs: Return valid delalloc range when the page does not have PG_Dirty flag set or has been invalidated

2015-09-30 Thread Chandan Rajendra
The following issue was observed when running generic/095 test on subpagesize-blocksize patchset. Assume that we are trying to write a dirty page that is mapping file offset range [159744, 163839]. writepage_delalloc() find_lock_delalloc_range(*start = 159744, *end = 0)

[RFC PATCH V4 07/13] Btrfs: Use (eb->start, seq) as search key for tree modification log

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize a page can map multiple extent buffers and hence using (page index, seq) as the search key is incorrect. For example, searching through tree modification log tree can return an entry associated with the first extent buffer mapped by the page (if such an entry exists), when

[RFC PATCH V4 04/13] Btrfs: fallocate: Work with sectorsized blocks

2015-09-30 Thread Chandan Rajendra
While at it, this commit changes btrfs_truncate_page() to truncate sectorsized blocks instead of pages. Hence the function has been renamed to btrfs_truncate_block(). Signed-off-by: Chandan Rajendra --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file.c | 47

[RFC PATCH V4 06/13] Btrfs: Search for all ordered extents that could span across a page

2015-09-30 Thread Chandan Rajendra
In subpagesize-blocksize scenario it is not sufficient to search using the first byte of the page to make sure that there are no ordered extents present across the page. Fix this. Signed-off-by: Chandan Rajendra --- fs/btrfs/extent_io.c | 3 ++- fs/btrfs/inode.c

[RFC PATCH V4 12/13] Btrfs: prepare_pages: Retry adding a page to the page cache

2015-09-30 Thread Chandan Rajendra
When reading the page from the disk, we can race with Direct I/O which can get the page lock (before prepare_uptodate_page() gets it) and can go ahead and invalidate the page. Hence if the page is not found in the inode's address space, retry the operation of getting a page. Signed-off-by:

[RFC PATCH V4 01/13] Btrfs: __btrfs_buffered_write: Reserve/release extents aligned to block size

2015-09-30 Thread Chandan Rajendra
Currently, the code reserves/releases extents in multiples of PAGE_CACHE_SIZE units. Fix this by doing reservation/releases in block size units. Signed-off-by: Chandan Rajendra --- fs/btrfs/file.c | 44 +++- 1 file changed, 31

[PATCH V5 00/13] Btrfs: Pre subpagesize-blocksize cleanups

2015-09-30 Thread Chandan Rajendra
The patches posted along with this cover letter are cleanups made during the developement of subpagesize-blocksize patchset. I believe that they can be integrated with the mainline kernel. Hence I have posted them separately from the subpagesize-blocksize patchset. I have testsed the patchset by

Re: [RFC PATCH] fstests: generic: Test that fsync works on file in overlayfs merged directory

2015-09-30 Thread Dave Chinner
On Wed, Sep 30, 2015 at 10:57:45PM +0300, Roman Lebedev wrote: > As per overlayfs documentation, any activity on a merged directory > for a application that is doing such activity should work exactly > as if that would be a normal, non overlayfs-merged directory. > > That is, e.g. simple

Re: [RFC PATCH] fstests: generic: Test that fsync works on file in overlayfs merged directory

2015-09-30 Thread Eric Sandeen
On 9/30/15 4:56 PM, Dave Chinner wrote: > On Wed, Sep 30, 2015 at 10:57:45PM +0300, Roman Lebedev wrote: >> As per overlayfs documentation, any activity on a merged directory >> for a application that is doing such activity should work exactly >> as if that would be a normal, non

Re: RAID5 doesn't mount on boot, but you can afterwards?

2015-09-30 Thread Duncan
Sjoerd posted on Wed, 30 Sep 2015 18:49:21 +0200 as excerpted: > A RAID5 setup on raw devices doesn't want to automount on boot. After I > skip mounting I can log in (Ubuntu server 14.04 on kernel 4.1.8) and > just do a "sudo mount -a" to get all mounted fine. So the array doesn't > seem to be

[PATCH v5 5/9] vfs: Copy shouldn't forbid ranges inside the same file

2015-09-30 Thread Anna Schumaker
This is perfectly valid for BTRFS and XFS, so let's leave this up to filesystems to check. Signed-off-by: Anna Schumaker Reviewed-by: David Sterba Reviewed-by: Darrick J. Wong --- fs/read_write.c | 4 1 file changed, 4

[PATCH v5 9/9] btrfs: btrfs_copy_file_range() only supports reflinks

2015-09-30 Thread Anna Schumaker
Reject copies that don't have the COPY_FR_REFLINK flag set. Signed-off-by: Anna Schumaker Reviewed-by: David Sterba --- fs/btrfs/ioctl.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index

[PATCH v5 4/9] vfs: Copy should check len after file open mode

2015-09-30 Thread Anna Schumaker
I don't think it makes sense to report that a copy succeeded if the files aren't open properly. Signed-off-by: Anna Schumaker Reviewed-by: David Sterba --- fs/read_write.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v5 10/9] copy_file_range.2: New page documenting copy_file_range()

2015-09-30 Thread Anna Schumaker
copy_file_range() is a new system call for copying ranges of data completely in the kernel. This gives filesystems an opportunity to implement some kind of "copy acceleration", such as reflinks or server-side-copy (in the case of NFS). Signed-off-by: Anna Schumaker

[PATCH v5 1/9] vfs: add copy_file_range syscall and vfs helper

2015-09-30 Thread Anna Schumaker
From: Zach Brown Add a copy_file_range() system call for offloading copies between regular files. This gives an interface to underlying layers of the storage stack which can copy without reading and writing all the data. There are a few candidates that should support copy

[PATCH v5 8/9] vfs: Add vfs_copy_file_range() support for pagecache copies

2015-09-30 Thread Anna Schumaker
This allows us to have an in-kernel copy mechanism that avoids frequent switches between kernel and user space. This is especially useful so NFSD can support server-side copies. I make pagecache copies configurable by adding three new (exclusive) flags: - COPY_FR_REFLINK tells

[PATCH v5 7/9] vfs: Remove copy_file_range mountpoint checks

2015-09-30 Thread Anna Schumaker
I still want to do an in-kernel copy even if the files are on different mountpoints, and NFS has a "server to server" copy that expects two files on different mountpoints. Let's have individual filesystems implement this check instead. Signed-off-by: Anna Schumaker

Re: [PATCH] btrfs: fix a compiler warning of may be used uninitialized

2015-09-30 Thread David Sterba
On Wed, Sep 30, 2015 at 11:55:13AM +0800, Zhao Lei wrote: > > AFAICS the codepath that would use uninitialized value of count is not > > reachable: > > > > add_to_ctl = true > > > > 270 if (info->offset > root->ino_cache_progress) > > 271

Re: [PATCH 00/23] btrfs device related patch set

2015-09-30 Thread David Sterba
On Wed, Sep 30, 2015 at 06:10:53AM +0800, Anand Jain wrote: > > > On 09/29/2015 10:34 PM, David Sterba wrote: > > On Fri, Aug 14, 2015 at 06:32:45PM +0800, Anand Jain wrote: > >> Anand Jain (22): > >>Btrfs: rename btrfs_sysfs_add_one to btrfs_sysfs_add_mounted > >>Btrfs: rename

Re: [PATCH v3 1/2] btrfs-progs: Introduce warning and error for common use

2015-09-30 Thread David Sterba
On Mon, Sep 28, 2015 at 09:58:13PM +0800, Zhao Lei wrote: > And sometimes, we forgot add tailed '\n', This is actually a good point and we don't need to put the trailing newline to all the messages, similar to the btrfs_* macros used in kernel. I'll update the patches. -- To unsubscribe from this

Re: [PATCH v3 0/2] btrfs-progs: Introduce warning and error for common use

2015-09-30 Thread David Sterba
On Mon, Sep 28, 2015 at 09:58:12PM +0800, Zhao Lei wrote: > This patch introduce warning() and error() as common function, ... > Converting all source is a big work, this patch convert cmds-scrub.c > We'll convert others these days, and new code can use these function > directly. > > Zhao Lei (2):

Re: Add stripes filter

2015-09-30 Thread David Sterba
On Tue, Sep 29, 2015 at 12:21:39PM +, Hugo Mills wrote: > On Tue, Sep 29, 2015 at 08:10:19AM -0400, Austin S Hemmelgarn wrote: > > On 2015-09-29 08:00, David Sterba wrote: > > >On Mon, Sep 28, 2015 at 05:57:05PM +, Gabríel Arthúr Pétursson wrote: > > >>The attached patches to linux and

Re: [PATCH] Btrfs: check pending chunks when shrinking fs to avoid corruption

2015-09-30 Thread Alex Lyakas
Hi Filipe, Looking the code of this patch, I see that if we discover a pending chunk, we unlock the chunk mutex, commit the transaction (which completes the allocation of all pending chunks and inserts relevant items into the device tree and chunk tree), and retry the search. However, after we

Re: [PATCH v2 1/2] btrfs: Fix lost-data-profile caused by auto removing bg

2015-09-30 Thread Filipe Manana
On Wed, Sep 30, 2015 at 12:11 PM, Zhao Lei wrote: > Reproduce: > (In integration-4.3 branch) > > TEST_DEV=(/dev/vdg /dev/vdh) > TEST_DIR=/mnt/tmp > > umount "$TEST_DEV" >/dev/null > mkfs.btrfs -f -d raid1 "${TEST_DEV[@]}" > > mount -o nospace_cache "$TEST_DEV"

Re: [PATCH] btrfs: add stripes filter

2015-09-30 Thread David Sterba
Hi, thanks for the patch. The stripe filter is really helpful. There are some minor comments below but otherwise the patch looks good. On Mon, Sep 28, 2015 at 10:32:41PM +, Gabríel Arthúr Pétursson wrote: > --- a/fs/btrfs/ctree.h > +++ b/fs/btrfs/ctree.h > @@ -849,7 +849,11 @@ struct

Re: Add stripes filter

2015-09-30 Thread David Sterba
On Tue, Sep 29, 2015 at 08:10:19AM -0400, Austin S Hemmelgarn wrote: > On 2015-09-29 08:00, David Sterba wrote: > > On Mon, Sep 28, 2015 at 05:57:05PM +, Gabríel Arthúr Pétursson wrote: > >> The attached patches to linux and btrfs-progs add support for filtering > >> based on the number of

Re: [PATCH v2 2/2] btrfs-progs: device delete to accept devid

2015-09-30 Thread David Sterba
On Wed, Sep 30, 2015 at 06:03:42AM +0800, Anand Jain wrote: > +struct btrfs_ioctl_vol_args_v3 { Can we use struct btrfs_ioctl_vol_args_v2 for that purpose? It contains the 'flags' so we can abuse the name field to store the device id and set the flags accordingly. > + __s64 fd; > + char

Re: [PATCH 00/11] using of calloc instead of malloc+memset

2015-09-30 Thread David Sterba
On Tue, Sep 29, 2015 at 07:10:35PM +0200, Silvio Fricke wrote: > Silvio Fricke (11): > btrfs-progs: use calloc instead of malloc+memset for btrfs-image.c > btrfs-progs: use calloc instead of malloc+memset for btrfs-list.c > btrfs-progs: use calloc instead of malloc+memset for chunk-recover.c