Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Qu Wenruo
On 2017年12月07日 15:32, Marat Khalili wrote: > On 07/12/17 08:27, Qu Wenruo wrote: >> When doing snapshot, btrfs only needs to increase reference of 2nd >> highest level tree blocks of original snapshot, other than "walking the >> tree". >> (If tree root level is 2, then level 2 node is copied,

Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Marat Khalili
On 07/12/17 08:27, Qu Wenruo wrote: When doing snapshot, btrfs only needs to increase reference of 2nd highest level tree blocks of original snapshot, other than "walking the tree". (If tree root level is 2, then level 2 node is copied, while all reference of level 1 tree blocks get increased)

Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Misono, Tomohiro
On 2017/12/07 11:56, Duncan wrote: > Austin S. Hemmelgarn posted on Wed, 06 Dec 2017 07:39:56 -0500 as > excerpted: > >> Somewhat OT, but the only operation that's remotely 'instant' is >> creating an empty subvolume. Snapshot creation has to walk the tree in >> the subvolume being snapshotted,

Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Qu Wenruo
On 2017年12月06日 20:39, Austin S. Hemmelgarn wrote: > Somewhat OT, but the only operation that's remotely 'instant' is > creating an empty subvolume.  Snapshot creation has to walk the tree in > the subvolume being snapshotted, which can take a long time (and as a > result of it's implementation,

Re: [PATCH] fstests: btrfs: Add test case to check if btrfs can handle full fs trim correctly

2017-12-06 Thread Eryu Guan
On Thu, Dec 07, 2017 at 08:43:43AM +0800, Qu Wenruo wrote: > Ping. > > Any comment on this? It's been pushed out to upstream, see commit 88231c0c0b9d Thanks, Eryu -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Duncan
Austin S. Hemmelgarn posted on Wed, 06 Dec 2017 07:39:56 -0500 as excerpted: > Somewhat OT, but the only operation that's remotely 'instant' is > creating an empty subvolume. Snapshot creation has to walk the tree in > the subvolume being snapshotted, which can take a long time (and as a >

Re: mail notifications to root once quota limit reached

2017-12-06 Thread Chris Murphy
On Wed, Nov 22, 2017 at 9:39 AM, Chris Murphy wrote: > On Wed, Nov 22, 2017 at 8:36 AM, ST wrote: >> Hello, >> >> is it possible to get mail notifications to root once quota limit is >> reached? If not should I file a feature request? > > You should

Re: system OOM when using ghettoVCB script to backup VMs to nfs server (sync mode) running btrfs

2017-12-06 Thread Taibai Li
I think no special option: /dev/md127 on /data type btrfs (rw,noatime,nodiratime,nospace_cache,subvolid=5,subvol=/) ok, will try laster kernel. thanks. On Thu, Dec 7, 2017 at 9:21 AM, Qu Wenruo wrote: > > > On 2017年12月07日 09:19, Taibai Li wrote: >> thanks for the quick

Re: system OOM when using ghettoVCB script to backup VMs to nfs server (sync mode) running btrfs

2017-12-06 Thread Qu Wenruo
On 2017年12月07日 09:19, Taibai Li wrote: > thanks for the quick response, I tired to test this on 4.4.100 > kernel, disabled quota : > # btrfs qgroup show /data/ > ERROR: can't list qgroups: quotas not enabled > > But seems it still OOM after about 7 hours copyed 144G files, any > other ideas?

Re: system OOM when using ghettoVCB script to backup VMs to nfs server (sync mode) running btrfs

2017-12-06 Thread Taibai Li
thanks for the quick response, I tired to test this on 4.4.100 kernel, disabled quota : # btrfs qgroup show /data/ ERROR: can't list qgroups: quotas not enabled But seems it still OOM after about 7 hours copyed 144G files, any other ideas? Maybe I will try to test by disable quota on 4.14

Re: [PATCH] fstests: btrfs: Add test case to check if btrfs can handle full fs trim correctly

2017-12-06 Thread Qu Wenruo
Ping. Any comment on this? Thanks, Qu On 2017年11月29日 14:14, Qu Wenruo wrote: > Ancient commit f4c697e6406d ("btrfs: return EINVAL if start > total_bytes in > fitrim ioctl") introduced a regression where btrfs may fail to trim any > free space in existing block groups. > > It's caused by

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-06 Thread Dave Chinner
On Wed, Dec 06, 2017 at 06:06:48AM -0800, Matthew Wilcox wrote: > On Wed, Dec 06, 2017 at 07:44:04PM +1100, Dave Chinner wrote: > > On Tue, Dec 05, 2017 at 08:45:49PM -0800, Matthew Wilcox wrote: > > > That said, using xa_cmpxchg() in the dquot code looked like the right > > > thing to do? Since

Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-06 Thread Qu Wenruo
On 2017年12月06日 22:18, Arnd Bergmann wrote: > The return value of sizeof() is of type size_t, so we must print it > using the %z format modifier rather than %l to avoid this warning > on some architectures: > > fs/btrfs/tree-checker.c: In function 'check_dir_item': >

Re: [PATCH 3/3] Btrfs: make raid6 rebuild retry more

2017-12-06 Thread Liu Bo
On Wed, Dec 06, 2017 at 08:11:30AM +0800, Qu Wenruo wrote: > > > On 2017年12月06日 06:55, Liu Bo wrote: > > On Tue, Dec 05, 2017 at 07:09:25PM +0100, David Sterba wrote: > >> On Tue, Dec 05, 2017 at 04:07:35PM +0800, Qu Wenruo wrote: > @@ -2166,11 +2166,21 @@ int raid56_parity_recover(struct

Re: [PATCH v4 00/73] XArray version 4

2017-12-06 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 04:58:29PM -0700, Ross Zwisler wrote: > Maybe I missed this from a previous version, but can you explain the > motivation for replacing the radix tree with an xarray? (I think this should > probably still be part of the cover letter?) Do we have a performance problem > we

Re: [PATCH v4 00/73] XArray version 4

2017-12-06 Thread Ross Zwisler
On Tue, Dec 05, 2017 at 04:40:46PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > I looked through some notes and decided this was version 4 of the XArray. > Last posted two weeks ago, this version includes a *lot* of changes. > I'd like to thank Dave Chinner for

Re: [PATCH] fstests: btrfs: reproduce a read failure on raid6 setup

2017-12-06 Thread Liu Bo
On Wed, Dec 06, 2017 at 04:56:11PM +0800, Eryu Guan wrote: > On Mon, Dec 04, 2017 at 03:33:23PM -0700, Liu Bo wrote: > > This test case is to reproduce a bug of raid6 reconstruction process. > > > > The kernel fix are > > Btrfs: do not merge rbios if their fail stripe index are not identical > >

Re: [PATCH v2 06/11] writeback: add counters for metadata usage

2017-12-06 Thread Johannes Weiner
On Wed, Dec 06, 2017 at 03:18:35PM -0500, Josef Bacik wrote: > On Mon, Dec 04, 2017 at 02:06:30PM +0100, Jan Kara wrote: > > On Wed 22-11-17 16:16:01, Josef Bacik wrote: > > > diff --git a/mm/util.c b/mm/util.c > > > index 34e57fae959d..681d62631ee0 100644 > > > --- a/mm/util.c > > > +++

Re: [PATCH v2 06/11] writeback: add counters for metadata usage

2017-12-06 Thread Josef Bacik
On Mon, Dec 04, 2017 at 02:06:30PM +0100, Jan Kara wrote: > On Wed 22-11-17 16:16:01, Josef Bacik wrote: > > From: Josef Bacik > > > > Btrfs has no bounds except memory on the amount of dirty memory that we > > have in > > use for metadata. Historically we have used a special

Re: [PATCH] btrfs: Handle btrfs_set_extent_delalloc failure

2017-12-06 Thread David Sterba
On Wed, Dec 06, 2017 at 09:27:50AM +0200, Nikolay Borisov wrote: > On 5.12.2017 19:50, David Sterba wrote: > > On Tue, Dec 05, 2017 at 04:10:59PM +0800, Qu Wenruo wrote: > >> > >> > >> On 2017年12月05日 15:29, Nikolay Borisov wrote: > >>> This function was introduced by 247e743cbe6e ("Btrfs: Use

Re: [PATCH] btrfs: put btrfs_ioctl_vol_args_v2 related defines together

2017-12-06 Thread David Sterba
On Wed, Dec 06, 2017 at 11:40:10AM +0800, Anand Jain wrote: > Just a code spatial rearrangement, no functional change. > > Signed-off-by: Anand Jain Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in

[PATCH 23/45] fs: btrfs: remove duplicate includes

2017-12-06 Thread Pravin Shedge
These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge --- fs/btrfs/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/super.c

Re: [PATCH 5/5] btrfs: Greatly simplify btrfs_read_dev_super

2017-12-06 Thread David Sterba
On Mon, Dec 04, 2017 at 06:20:09PM +0200, Nikolay Borisov wrote: > >> I don't understand what problem *should* be solved here... > > > > Without any further checks and validation, we cannot simply iterate over > > all superblocks and try to mount anything that looks ok. Even if the > > offsets

[PATCH v8 0/5] Add the ability to do BPF directed error injection

2017-12-06 Thread Josef Bacik
Jon noticed that I had a typo in my _ASM_KPROBE_ERROR_INJECT macro. I went to figure out why the compiler didn't catch it and it's because it was not used anywhere. I had copied it from the trace blacklist code without understanding where it was used as cscope didn't find the original macro I

[PATCH v8 1/5] add infrastructure for tagging functions as error injectable

2017-12-06 Thread Josef Bacik
From: Josef Bacik Using BPF we can override kprob'ed functions and return arbitrary values. Obviously this can be a bit unsafe, so make this feature opt-in for functions. Simply tag a function with KPROBE_ERROR_INJECT_SYMBOL in order to give BPF access to that function for error

[PATCH v8 3/5] bpf: add a bpf_override_function helper

2017-12-06 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this with the

[PATCH v8 4/5] samples/bpf: add a test for bpf_override_return

2017-12-06 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: Alexei Starovoitov

[PATCH v8 5/5] btrfs: allow us to inject errors at io_ctl_init

2017-12-06 Thread Josef Bacik
From: Josef Bacik This was instrumental in reproducing a space cache bug. Signed-off-by: Josef Bacik Acked-by: Ingo Molnar --- fs/btrfs/free-space-cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/free-space-cache.c

[PATCH v8 2/5] btrfs: make open_ctree error injectable

2017-12-06 Thread Josef Bacik
From: Josef Bacik This allows us to do error injection with BPF for open_ctree. Signed-off-by: Josef Bacik Acked-by: Ingo Molnar --- fs/btrfs/disk-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/disk-io.c

Re: [PATCH 4/5] btrfs: Remove redundant NULL check

2017-12-06 Thread David Sterba
On Fri, Dec 01, 2017 at 11:19:43AM +0200, Nikolay Borisov wrote: > Before returning hole_em in btrfs_get_fiemap_extent we check if it's different > than null. However, by the time this null check is triggered we already know > hole_em is not null because it means it points to the em we found and

Re: [PATCH 3/5] btrfs: Fix possible off-by-one in btrfs_search_path_in_tree

2017-12-06 Thread David Sterba
On Fri, Dec 01, 2017 at 11:19:42AM +0200, Nikolay Borisov wrote: > The name char array passed to btrfs_search_path_in_tree is of size > BTRFS_INO_LOOKUP_PATH_MAX (4080). So the actual accessible char indexes > are in the range of [0, 4079]. Currently the code uses the define but this > represents

Re: [PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-06 Thread David Sterba
On Wed, Dec 06, 2017 at 03:18:14PM +0100, Arnd Bergmann wrote: > The return value of sizeof() is of type size_t, so we must print it > using the %z format modifier rather than %l to avoid this warning > on some architectures: > > fs/btrfs/tree-checker.c: In function 'check_dir_item': >

Re: [PATCH] Btrfs: disable FUA if mounted with nobarrier

2017-12-06 Thread David Sterba
On Tue, Dec 05, 2017 at 10:54:02PM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > I was seeing disk flushes still happening when I mounted a Btrfs > filesystem with nobarrier for testing. This is because we use FUA to > write out the first super block, and on devices

[PATCH] btrfs: tree-checker: use %zu format string for size_t

2017-12-06 Thread Arnd Bergmann
The return value of sizeof() is of type size_t, so we must print it using the %z format modifier rather than %l to avoid this warning on some architectures: fs/btrfs/tree-checker.c: In function 'check_dir_item': fs/btrfs/tree-checker.c:273:50: error: format '%lu' expects argument of type 'long

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-06 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 07:44:04PM +1100, Dave Chinner wrote: > On Tue, Dec 05, 2017 at 08:45:49PM -0800, Matthew Wilcox wrote: > > That said, using xa_cmpxchg() in the dquot code looked like the right > > thing to do? Since we'd dropped the qi mutex and the ILOCK, it looks > > entirely

Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Austin S. Hemmelgarn
On 2017-12-05 23:52, Misono, Tomohiro wrote: On 2017/12/05 21:41, Austin S. Hemmelgarn wrote: On 2017-12-05 03:43, Qu Wenruo wrote: On 2017年12月05日 16:25, Misono, Tomohiro wrote: Hello all, I want to address some issues of subvolume usability for a normal user. i.e. a user can create

Re: [RFC] Improve subvolume usability for a normal user

2017-12-06 Thread Austin S. Hemmelgarn
On 2017-12-05 17:08, Goffredo Baroncelli wrote: On 12/05/2017 09:17 PM, Austin S. Hemmelgarn wrote: On 2017-12-05 14:09, Goffredo Baroncelli wrote: On 12/05/2017 07:46 PM, Graham Cobb wrote: On 05/12/17 18:01, Goffredo Baroncelli wrote: On 12/05/2017 04:42 PM, Graham Cobb wrote: []

Re: btrfs subvolume list for users?

2017-12-06 Thread Ulli Horlacher
On Wed 2017-12-06 (08:24), Ulli Horlacher wrote: > Is there a way for a non-root user to list his subvolumes? I must have Alzheimer: I have asked this already 3 month ago and found a workaround by muself Date: Sun, 17 Sep 2017 10:48:10 +0200 Message-ID:

Re: [PATCH] fstests: btrfs: reproduce a read failure on raid6 setup

2017-12-06 Thread Eryu Guan
On Mon, Dec 04, 2017 at 03:33:23PM -0700, Liu Bo wrote: > This test case is to reproduce a bug of raid6 reconstruction process. > > The kernel fix are > Btrfs: do not merge rbios if their fail stripe index are not identical > Btrfs: make raid6 rebuild retry more > > Signed-off-by: Liu Bo

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-06 Thread Dave Chinner
On Tue, Dec 05, 2017 at 08:45:49PM -0800, Matthew Wilcox wrote: > On Wed, Dec 06, 2017 at 02:14:56PM +1100, Dave Chinner wrote: > > > The other conversions use the normal API instead of the advanced API, so > > > all of this gets hidden away. For example, the inode cache does this: > > > > Ah,