[PATCH] btrfs,vfs: allow FILE_EXTENT_SAME on a file opened ro

2016-05-19 Thread Adam Borowski
(Only btrfs currently implements dedupe_file_range.) Instead of checking the mode of the file descriptor, let's check whether it could have been opened rw. This allows fixing failures when deduping a live system: anyone trying to exec a file currently being deduped gets ETXTBSY. Issuing this ioc

RE: [Not TLS] Re: Reducing impact of periodic btrfs balance

2016-05-19 Thread Paul Jones
> -Original Message- > From: linux-btrfs-ow...@vger.kernel.org [mailto:linux-btrfs- > ow...@vger.kernel.org] On Behalf Of Graham Cobb > Sent: Thursday, 19 May 2016 8:11 PM > To: linux-btrfs@vger.kernel.org > Subject: Re: [Not TLS] Re: Reducing impact of periodic btrfs balance > > On 19/0

Re: [RFC PATCH v2.1 16/16] btrfs-progs: fsck: Introduce low memory mode

2016-05-19 Thread Qu Wenruo
David Sterba wrote on 2016/05/19 16:51 +0200: On Wed, May 18, 2016 at 08:58:57AM +0800, Qu Wenruo wrote: Josef Bacik wrote on 2016/05/17 11:29 -0400: On 05/17/2016 05:38 AM, Qu Wenruo wrote: Thanks for the review. I'll add it to github branch to avoid unneeded mail bombing. Thanks. I di

[PATCH] btrfs-progs: fsck: Add more explanation on low memory mode

2016-05-19 Thread Qu Wenruo
It seems the initial support for low memory mode will come in recent release, it's better to add more explanation on the unsupported functions, to avoid user reporting known bugs. Signed-off-by: Qu Wenruo --- Documentation/btrfs-check.asciidoc | 9 - 1 file changed, 8 insertions(+), 1 de

Re: [1/1 v2] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
Hi David, Sorry for the noise. Please disregard my v1 patch and subsequent emails. This patch is for upstream linux-next. From now on I think that's what I'm going to work from, to keep things simple, because it seems I'm still inept with git. Regards, Nicholas -- To unsubscribe from this list

[PATCH 0/1 v2] for linux-next! String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
Hi David, There. I decided to just check out a fresh copy of linux-next.git from a URL provided in a previous email, because I'm clearly still inept with git. Please disregard my last thread. I took a look at what you merged and what you didn't for my review of btrfs-progs, and revised my ap

[1/1 v2] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
Signed-off-by: Nicholas D Steeves --- fs/btrfs/backref.c| 2 +- fs/btrfs/btrfs_inode.h| 2 +- fs/btrfs/check-integrity.c| 2 +- fs/btrfs/ctree.c | 14 +++--- fs/btrfs/ctree.h | 6 +++--- fs/btrfs/delayed-ref.h

Re: [PATCH 0/4] Add support to clear v1 free space cache for btrfs check

2016-05-19 Thread Qu Wenruo
Ivan P wrote on 2016/05/19 18:54 +0200: Not sure why I was so fixated on installing it - thanks for reminding. I was able to run it, but it fails: === # ./btrfsck --repair --clear-space-cache -p /dev/sda enabling repair mode Clearing all free space cache btrfs unable to

Re: [PATCH 0/1] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
On 19 May 2016 at 19:47, Nicholas D Steeves wrote: > On 19 May 2016 at 19:13, Nicholas D Steeves wrote: >> Nicholas D Steeves (1): >> String and comment review: Fix typos; fix a couple of mandatory >> grammatical issues for clarity. >> >> fs/btrfs/backref.c| 2 +- >> fs/bt

Re: sharing page cache pages between multiple mappings

2016-05-19 Thread Dave Chinner
On Thu, May 19, 2016 at 12:17:14PM +0200, Miklos Szeredi wrote: > On Thu, May 19, 2016 at 11:05 AM, Michal Hocko wrote: > > On Thu 19-05-16 10:20:13, Miklos Szeredi wrote: > >> Has anyone thought about sharing pages between multiple files? > >> > >> The obvious application is for COW filesytems wh

Re: [PATCH 0/1] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
On 19 May 2016 at 19:13, Nicholas D Steeves wrote: > Nicholas D Steeves (1): > String and comment review: Fix typos; fix a couple of mandatory > grammatical issues for clarity. > > fs/btrfs/backref.c| 2 +- > fs/btrfs/btrfs_inode.h| 2 +- > fs/btrfs/check-integ

Re: Hot data tracking / hybrid storage

2016-05-19 Thread Henk Slager
On Thu, May 19, 2016 at 8:51 PM, Austin S. Hemmelgarn wrote: > On 2016-05-19 14:09, Kai Krakow wrote: >> >> Am Wed, 18 May 2016 22:44:55 + (UTC) >> schrieb Ferry Toth : >> >>> Op Tue, 17 May 2016 20:33:35 +0200, schreef Kai Krakow: >>> Am Tue, 17 May 2016 07:32:11 -0400 schrieb "Austin S.

[PATCH 1/1] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
Signed-off-by: Nicholas D Steeves --- fs/btrfs/backref.c| 2 +- fs/btrfs/btrfs_inode.h| 2 +- fs/btrfs/check-integrity.c| 2 +- fs/btrfs/ctree.c | 14 +++--- fs/btrfs/ctree.h | 10 +- fs/btrfs/delayed-ref.h

[PATCH 0/1] String and comment review: Fix typos; fix a couple of mandatory grammatical issues for clarity.

2016-05-19 Thread Nicholas D Steeves
Hi David, I took a look at what you merged and what you didn't for my review of btrfs-progs, and revised my approach accordingly. There are six edits that require your review. Please search/grep for "Steeves" to find them. Cheers! Nicholas Nicholas D Steeves (1): String and comment review:

Re: Hot data tracking / hybrid storage

2016-05-19 Thread Kai Krakow
Am Thu, 19 May 2016 14:51:01 -0400 schrieb "Austin S. Hemmelgarn" : > For a point of reference, I've > got a pair of 250GB Crucial MX100's (they cost less than 0.50 USD per > GB when I got them and provide essentially the same power-loss > protections that the high end Intel SSD's do) which have

Re: [PATCH] Btrfs: fix handling of faults from btrfs_copy_from_user

2016-05-19 Thread Adam Borowski
On Thu, May 19, 2016 at 04:10:20PM -0400, Chris Mason wrote: > On Tue, May 17, 2016 at 10:47:27PM +0200, Adam Borowski wrote: > > On Tue, May 17, 2016 at 12:23:44PM -0400, Chris Mason wrote: > > > On Tue, May 17, 2016 at 05:14:51PM +0200, Adam Borowski wrote: > > > > On Mon, May 16, 2016 at 05:06:5

Re: [PATCH] Btrfs: fix handling of faults from btrfs_copy_from_user

2016-05-19 Thread Chris Mason
On Tue, May 17, 2016 at 10:47:27PM +0200, Adam Borowski wrote: > On Tue, May 17, 2016 at 12:23:44PM -0400, Chris Mason wrote: > > On Tue, May 17, 2016 at 05:14:51PM +0200, Adam Borowski wrote: > > > On Mon, May 16, 2016 at 05:06:55PM -0400, Chris Mason wrote: > > > > And now for the patch: > > > [.

Re: Hot data tracking / hybrid storage

2016-05-19 Thread Austin S. Hemmelgarn
On 2016-05-19 14:09, Kai Krakow wrote: Am Wed, 18 May 2016 22:44:55 + (UTC) schrieb Ferry Toth : Op Tue, 17 May 2016 20:33:35 +0200, schreef Kai Krakow: Am Tue, 17 May 2016 07:32:11 -0400 schrieb "Austin S. Hemmelgarn" : On 2016-05-17 02:27, Ferry Toth wrote: [...] [...] [...] [.

Re: Hot data tracking / hybrid storage

2016-05-19 Thread Kai Krakow
Am Wed, 18 May 2016 22:44:55 + (UTC) schrieb Ferry Toth : > Op Tue, 17 May 2016 20:33:35 +0200, schreef Kai Krakow: > > > Am Tue, 17 May 2016 07:32:11 -0400 schrieb "Austin S. Hemmelgarn" > > : > > > >> On 2016-05-17 02:27, Ferry Toth wrote: > [...] > [...] > >> [...] > [...]

Re: [PATCH 0/4] Add support to clear v1 free space cache for btrfs check

2016-05-19 Thread Ivan P
Not sure why I was so fixated on installing it - thanks for reminding. I was able to run it, but it fails: === # ./btrfsck --repair --clear-space-cache -p /dev/sda enabling repair mode Clearing all free space cache btrfs unable to find ref byte nr 812846673920 parent 0 root

Re: Crash after WARN_ON(BTRFS_I(inode)->csum_bytes)

2016-05-19 Thread Chris Mason
On Thu, May 19, 2016 at 12:25:53PM +0200, M G Berberich wrote: > Hello, > > a near total system crash (reboot via magic-sysreq-keys was possible) > which seems to be associated to btrfs. > > btrfs check (v 4.5.2) does not find any problem with any filesystems > on the system. > > Kernel is stock

Re: [RFC PATCH v2.1 16/16] btrfs-progs: fsck: Introduce low memory mode

2016-05-19 Thread David Sterba
On Wed, May 18, 2016 at 08:58:57AM +0800, Qu Wenruo wrote: > Josef Bacik wrote on 2016/05/17 11:29 -0400: > > On 05/17/2016 05:38 AM, Qu Wenruo wrote: > > > Thanks for the review. > > I'll add it to github branch to avoid unneeded mail bombing. Thanks. I did one more pass and fixed the error mes

Re: [PATCH V2] Btrfs: introduce ticketed enospc infrastructure

2016-05-19 Thread Austin S. Hemmelgarn
On 2016-05-18 07:24, Austin S. Hemmelgarn wrote: On 2016-05-17 13:30, Josef Bacik wrote: Our enospc flushing sucks. It is born from a time where we were early enospc'ing constantly because multiple threads would race in for the same reservation and randomly starve other ones out. So I came up

Re: [PATCH] btrfs-progs: Return earlier for previous item

2016-05-19 Thread David Sterba
On Thu, May 19, 2016 at 10:54:39AM +0800, Qu Wenruo wrote: > Follow kernel code to return earlier for btrfs_previous_item() function. > > Before this patch, btrfs_previous_item() doesn't use its min_objectid to > exit, this makes caller to check key to exit, and if caller doesn't > check, it will

Re: [PATCH] btrfs-progs: Enhance tree block check by checking empty leaf or node

2016-05-19 Thread David Sterba
On Thu, May 19, 2016 at 04:44:35PM +0800, Qu Wenruo wrote: > For btrfs, it's possible to have empty leaf, but empty node is not > possible. > > Add check for empty node for tree blocks. > > Suggested-by: Josef Bacik > Signed-off-by: Qu Wenruo Applied, thanks. -- To unsubscribe from this list:

Re: [PATCH 0/3] btrfs-progs: fixes on top of latest integration branch

2016-05-19 Thread David Sterba
On Thu, May 19, 2016 at 01:13:11PM +0800, Anand Jain wrote: > Your latest branch integration-20160517 is failing with > make install, 1/3 will fix it. While here can you also > apply 2/3 and 3/3 as below, however they aren't related > though. > btrfs-progs: fix make install failure > b

Re: [PATCH 1/3] btrfs-progs: fix make install failure

2016-05-19 Thread David Sterba
On Thu, May 19, 2016 at 01:13:12PM +0800, Anand Jain wrote: > /usr/bin/install -c -m644 -d 64-btrfs-dm.rules /usr/lib/udev/rules.d > /usr/bin/install: cannot create directory ‘64-btrfs-dm.rules’: File exists > Makefile:400: recipe for target 'install' failed > make: *** [install] Error 1 > > fixes

Re: [RFC PATCH] btrfs: correct inode's outstanding_extents computation

2016-05-19 Thread Filipe Manana
On Thu, May 19, 2016 at 11:49 AM, Wang Xiaoguang wrote: > This issue was revealed by modifing BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, > When modifing BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, fsstress test often gets > these warnings from btrfs_destroy_inode(): > WARN_ON(BTRFS_I(inode)->outstand

Re: sharing page cache pages between multiple mappings

2016-05-19 Thread Michal Hocko
On Thu 19-05-16 12:17:14, Miklos Szeredi wrote: > On Thu, May 19, 2016 at 11:05 AM, Michal Hocko wrote: > > On Thu 19-05-16 10:20:13, Miklos Szeredi wrote: > >> Has anyone thought about sharing pages between multiple files? > >> > >> The obvious application is for COW filesytems where there are >

[RFC PATCH] btrfs: correct inode's outstanding_extents computation

2016-05-19 Thread Wang Xiaoguang
This issue was revealed by modifing BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, When modifing BTRFS_MAX_EXTENT_SIZE(128MB) to 64KB, fsstress test often gets these warnings from btrfs_destroy_inode(): WARN_ON(BTRFS_I(inode)->outstanding_extents); WARN_ON(BTRFS_I(inode)->reserved_extents);

Re: [PATCH] btrfs: remove unnecessary btrfs_delalloc_release_metadata() call

2016-05-19 Thread Wang Xiaoguang
Hi, On 05/19/2016 06:29 PM, Filipe Manana wrote: On Thu, May 19, 2016 at 10:44 AM, Wang Xiaoguang wrote: In __btrfs_write_out_cache(), we don't call btrfs_delalloc_reserve_metadata() or btrfs_delalloc_reserve_space() to reserve metadata space, so we also should not call btrfs_delalloc_release_

Re: [PATCH] btrfs: remove unnecessary btrfs_delalloc_release_metadata() call

2016-05-19 Thread Filipe Manana
On Thu, May 19, 2016 at 10:44 AM, Wang Xiaoguang wrote: > In __btrfs_write_out_cache(), we don't call btrfs_delalloc_reserve_metadata() > or btrfs_delalloc_reserve_space() to reserve metadata space, so we also should > not call btrfs_delalloc_release_metadata(), in which > BTRFS_I(inode)->outstan

Crash after WARN_ON(BTRFS_I(inode)->csum_bytes)

2016-05-19 Thread M G Berberich
Hello, a near total system crash (reboot via magic-sysreq-keys was possible) which seems to be associated to btrfs. btrfs check (v 4.5.2) does not find any problem with any filesystems on the system. Kernel is stock 4.6, booting without initramfs, system is Debian stretch (testing). [154452.371

Re: sharing page cache pages between multiple mappings

2016-05-19 Thread Miklos Szeredi
On Thu, May 19, 2016 at 11:05 AM, Michal Hocko wrote: > On Thu 19-05-16 10:20:13, Miklos Szeredi wrote: >> Has anyone thought about sharing pages between multiple files? >> >> The obvious application is for COW filesytems where there are >> logically distinct files that physically share data and c

Re: [Not TLS] Re: Reducing impact of periodic btrfs balance

2016-05-19 Thread Graham Cobb
On 19/05/16 05:09, Duncan wrote: > So to Graham, are these 1.5K snapshots all of the same subvolume, or > split into snapshots of several subvolumes? If it's all of the same > subvolume or of only 2-3 subvolumes, you still have some work to do in > terms of getting down to recommended snapshot

[PATCH] btrfs: remove unnecessary btrfs_delalloc_release_metadata() call

2016-05-19 Thread Wang Xiaoguang
In __btrfs_write_out_cache(), we don't call btrfs_delalloc_reserve_metadata() or btrfs_delalloc_reserve_space() to reserve metadata space, so we also should not call btrfs_delalloc_release_metadata(), in which BTRFS_I(inode)->outstanding_extents will be decreased, then WARN_ON(BTRFS_I(inode)->outs

Re: sharing page cache pages between multiple mappings

2016-05-19 Thread Michal Hocko
On Thu 19-05-16 10:20:13, Miklos Szeredi wrote: > Has anyone thought about sharing pages between multiple files? > > The obvious application is for COW filesytems where there are > logically distinct files that physically share data and could easily > share the cache as well if there was infrastru

[PATCH] btrfs-progs: Enhance tree block check by checking empty leaf or node

2016-05-19 Thread Qu Wenruo
For btrfs, it's possible to have empty leaf, but empty node is not possible. Add check for empty node for tree blocks. Suggested-by: Josef Bacik Signed-off-by: Qu Wenruo --- disk-io.c | 5 + 1 file changed, 5 insertions(+) diff --git a/disk-io.c b/disk-io.c index 86abdeb..b4f185f 100644 -

sharing page cache pages between multiple mappings

2016-05-19 Thread Miklos Szeredi
Has anyone thought about sharing pages between multiple files? The obvious application is for COW filesytems where there are logically distinct files that physically share data and could easily share the cache as well if there was infrastructure for it. Thanks, Miklos -- To unsubscribe from this