[PATCH] Btrfs: create_subvol: Commit the current transaction if stale root entry exists.

2015-10-01 Thread Chandan Rajendra
The following call trace is seen when btrfs/031 test is executed in a loop, [ 120.577208] WARNING: CPU: 3 PID: 6202 at /home/chandan/repos/linux/fs/btrfs/ioctl.c:558 create_subvol+0x3e6/0x729() [ 120.581521] BTRFS: Transaction aborted (error -2) [ 120.585410] Modules linked in: [ 120.587460]

Re: [PATCH] Btrfs: create_subvol: Commit the current transaction if stale root entry exists.

2015-10-01 Thread Chandan Rajendra
On Thursday 01 Oct 2015 13:36:50 Filipe Manana wrote: > On Thu, Oct 1, 2015 at 12:57 PM, David Sterba wrote: > > On Thu, Oct 01, 2015 at 04:19:55PM +0530, Chandan Rajendra wrote: > >> This occurs because, > >> > >> Mount filesystem > >> Create subvol with ID 257 > >> Unmount

Re: [PATCH] Btrfs: create_subvol: Commit the current transaction if stale root entry exists.

2015-10-01 Thread David Sterba
On Thu, Oct 01, 2015 at 04:19:55PM +0530, Chandan Rajendra wrote: > This occurs because, > > Mount filesystem > Create subvol with ID 257 > Unmount filesystem > Mount filesystem > Delete subvol with ID 257 > btrfs_drop_snapshot() > Add root corresponding to subvol 257 into >

Re: [PATCH v4 7/9] Btrfs: add free space tree sanity tests

2015-10-01 Thread David Sterba
On Tue, Sep 29, 2015 at 08:50:36PM -0700, Omar Sandoval wrote: > +struct free_space_extent { > + u64 start, length; Structure members should be put on separate lines. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

Re: [PATCH] Btrfs: create_subvol: Commit the current transaction if stale root entry exists.

2015-10-01 Thread Filipe Manana
On Thu, Oct 1, 2015 at 12:57 PM, David Sterba wrote: > On Thu, Oct 01, 2015 at 04:19:55PM +0530, Chandan Rajendra wrote: >> This occurs because, >> >> Mount filesystem >> Create subvol with ID 257 >> Unmount filesystem >> Mount filesystem >> Delete subvol with ID 257 >>

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

2015-10-01 Thread Josef Bacik
On 09/30/2015 06:28 AM, Chandan Rajendra wrote: 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

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

2015-10-01 Thread David Sterba
On Wed, Sep 30, 2015 at 05:05:16PM +0200, David Sterba wrote: > >[PATCH 08/23] Btrfs: device delete by devid > >[PATCH 23/23] Btrfs: allow -o rw,degraded for single group profile > > In case the two patches are independent on the rest of series, it would > be better to put them towards

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

2015-10-01 Thread Josef Bacik
On 09/30/2015 06:28 AM, Chandan Rajendra wrote: 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

Re: [PATCH V5 10/13] Btrfs: Fix block size returned to user space

2015-10-01 Thread Josef Bacik
On 09/30/2015 06:28 AM, Chandan Rajendra wrote: 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

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

2015-10-01 Thread Anand Jain
On 10/01/2015 10:42 PM, David Sterba wrote: On Wed, Sep 30, 2015 at 05:05:16PM +0200, David Sterba wrote: [PATCH 08/23] Btrfs: device delete by devid [PATCH 23/23] Btrfs: allow -o rw,degraded for single group profile In case the two patches are independent on the rest of series, it

Re: [PATCH 21/23] Btrfs: fix fs logging for multi device

2015-10-01 Thread David Sterba
On Fri, Aug 14, 2015 at 06:33:06PM +0800, Anand Jain wrote: > In case of multi device btrfs fs, using one of device for > the logging purpose it quite confusing, instead use the > fsid. FSID is bit long, but the device path can be long > as well in some cases. The fsid in the log would be good

Re: [PATCH 16/23] Btrfs: device path change must be logged

2015-10-01 Thread Anand Jain
On 10/01/2015 09:40 PM, David Sterba wrote: On Fri, Aug 14, 2015 at 06:33:01PM +0800, Anand Jain wrote: >From the issue diagnosable point of view, log if the device path is changed. Signed-off-by: Anand Jain --- fs/btrfs/volumes.c | 4 1 file changed, 4

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

2015-10-01 Thread Josef Bacik
On 09/30/2015 06:18 AM, Chandan Rajendra wrote: 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 Reviewed-by: Josef Bacik

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

2015-10-01 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/30/15 7:11 AM, 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 V5 11/13] Btrfs: Clean pte corresponding to page straddling i_size

2015-10-01 Thread Josef Bacik
On 09/30/2015 06:28 AM, Chandan Rajendra wrote: 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

Re: [PATCH 21/23] Btrfs: fix fs logging for multi device

2015-10-01 Thread Anand Jain
On 10/01/2015 09:45 PM, David Sterba wrote: On Fri, Aug 14, 2015 at 06:33:06PM +0800, Anand Jain wrote: In case of multi device btrfs fs, using one of device for the logging purpose it quite confusing, instead use the fsid. FSID is bit long, but the device path can be long as well in some

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

2015-10-01 Thread Josef Bacik
On 09/30/2015 06:28 AM, Chandan Rajendra wrote: 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

[RFC PATCH] Btrfs: fix fs logging for multi device

2015-10-01 Thread Anand Jain
In case of multi device btrfs fs, using one of device for the logging purpose it quite confusing, instead use the fsid. FSID is bit long, but the device path can be long as well in some cases. Signed-off-by: Anand Jain --- fs/btrfs/super.c | 4 ++-- 1 file changed, 2

Re: [PATCH 16/23] Btrfs: device path change must be logged

2015-10-01 Thread David Sterba
On Fri, Aug 14, 2015 at 06:33:01PM +0800, Anand Jain wrote: > >From the issue diagnosable point of view, log if the device path is > changed. > > Signed-off-by: Anand Jain > --- > fs/btrfs/volumes.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

Re: [PATCH 1/2] btrfs: Add support to do stack item key operation

2015-10-01 Thread David Sterba
On Fri, Sep 25, 2015 at 10:38:00AM +0800, Qu Wenruo wrote: > +static inline void btrfs_stack_item_key(char *stack_leaf, > + struct btrfs_disk_key *disk_key, > + int nr) > +static inline void btrfs_stack_item_key_to_cpu(char

Re: btrfs: obtain block checksums from user space

2015-10-01 Thread David Sterba
On Thu, Sep 24, 2015 at 09:06:32PM +0300, Matwey V. Kornilov wrote: > I would like to read the list of the checksums for the specific file > stored onto btrfs filesystem. I think I could use the checksums in the > manner like rsync does, but safe both CPU (because csums are already > calculated

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

2015-10-01 Thread Hugo Mills
On Thu, Oct 01, 2015 at 07:04:43PM +0200, Sjoerd wrote: > On Thursday 01 October 2015 02:21:23 Duncan wrote: > > > That's very likely because unlike traditional single-device filesystems > > (including single-device btrfs), multi-device btrfs has multiple devices > > it must know about before it

Re: [PATCH] fstests: btrfs: add test for quota groups and drop snapshot

2015-10-01 Thread Mark Fasheh
On Tue, Sep 29, 2015 at 09:28:58AM +1000, Dave Chinner wrote: > On Wed, Sep 23, 2015 at 02:05:16PM -0700, Mark Fasheh wrote: > > Since the last time I sent this test, drop snapshot was broken again with > > respect to qgroups. What practical step could I take to get a test for that > > in here

[RFC][PATCH] btrfs: add ioctl to monitor subvolume dropping

2015-10-01 Thread Mark Fasheh
Dropping a subvolume in btrfs is a delayed operation which can persist across mounts (or crashes) - progress for the subvolume drop is recorded in a key on the root object. At the moment, userspace has no way of knowing when a snapshot is finally removed. This has become a problem when writing

Re: [PATCH 1/2] btrfs: Add support to do stack item key operation

2015-10-01 Thread Qu Wenruo
在 2015年10月02日 00:46, David Sterba 写道: On Fri, Sep 25, 2015 at 10:38:00AM +0800, Qu Wenruo wrote: +static inline void btrfs_stack_item_key(char *stack_leaf, + struct btrfs_disk_key *disk_key, + int nr) +static

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

2015-10-01 Thread Duncan
Hugo Mills posted on Thu, 01 Oct 2015 17:46:15 + as excerpted: > On Thu, Oct 01, 2015 at 07:04:43PM +0200, Sjoerd wrote: >> On Thursday 01 October 2015 02:21:23 Duncan wrote: >> >> > That's very likely because unlike traditional single-device >> > filesystems (including single-device btrfs),

Re: strange i/o errors with btrfs on raid/lvm

2015-10-01 Thread Russell Coker
On Sat, 26 Sep 2015 06:47:26 AM Chris Murphy wrote: > And then > > Aug 28 17:06:49 host mdadm[2751]: RebuildFinished event detected on md > device /dev/md/0, component device mismatches found: 2048 (on raid > level 10) > Aug 28 17:06:49 host mdadm[2751]: SpareActive event detected on md > device

Re: BTRFS as image store for KVM?

2015-10-01 Thread Russell Coker
On Sat, 26 Sep 2015 12:20:41 AM Austin S Hemmelgarn wrote: > > FYI: > > Linux pagecache use LRU cache algo, and in general case it's working good > > enough > > I'd argue that 'general usage' should be better defined in this > statement. Obviously, ZFS's ARC implementation provides better >