[PATCH] btrfs: log csums for all modified extents

2017-08-29 Thread josef
From: Josef Bacik Amir reported a bug discovered by his cleaned up version of my dm-log-writes xfstests where we were missing csums at certain replay points. This is because fsx was doing an msync(), which essentially fsync()'s a specific range of a file. We will log all modified extents, but o

Re: BTRFS: error (device dm-2) in btrfs_run_delayed_refs:2960: errno=-17 Object already exists (since 3.4 / 2012)

2017-08-29 Thread Josef Bacik
Sorry Marc, I’ll wire up a bcc script to try and catch when this happens. In order for it to work it’ll need to read the extent tree in before you mount the fs, is that something you’ll be able to swing or is this your root fs? Also is it the only btrfs fs on the system? Thanks, Josef On 8/

Re: BTRFS: error (device dm-2) in btrfs_run_delayed_refs:2960: errno=-17 Object already exists (since 3.4 / 2012)

2017-08-29 Thread Marc MERLIN
On Tue, Aug 29, 2017 at 02:30:19PM +, Josef Bacik wrote: > Sorry Marc, I’ll wire up a bcc script to try and catch when this > happens. In order for it to work it’ll need to read the extent tree in > before you mount the fs, is that something you’ll be able to swing or is > this your root fs?

Re: BTRFS: error (device dm-2) in btrfs_run_delayed_refs:2960: errno=-17 Object already exists (since 3.4 / 2012)

2017-08-29 Thread Josef Bacik
Alright I’ll figure out a way to differentiate between the fs’s, but being able to scan the fs before it’s mounted was the hardest part so that’s perfect. I’ll get something written up and tested today to make sure it won’t spit out false positives and send it to you this afternoon or tomorrow.

Decompression success/failure dependent on PAGE_SIZE?

2017-08-29 Thread Marek Behún
Hello, so I've been studying the linux btrfs code and have come across this: in inode.c function uncompress_inline the max_size size variable is set to min(max_size, PAGE_SIZE) and only max_size of output data are decompressed. The code for compression (in lzo.c for example) uses PAGE_SIZEd chun

Re: Decompression success/failure dependent on PAGE_SIZE?

2017-08-29 Thread Austin S. Hemmelgarn
On 2017-08-29 12:43, Marek Behún wrote: Hello, so I've been studying the linux btrfs code and have come across this: in inode.c function uncompress_inline the max_size size variable is set to min(max_size, PAGE_SIZE) and only max_size of output data are decompressed. The code for compression (

Re: Decompression success/failure dependent on PAGE_SIZE?

2017-08-29 Thread Nikolay Borisov
On 29.08.2017 19:43, Marek Behún wrote: > Hello, > > so I've been studying the linux btrfs code and have come across this: > > in inode.c function uncompress_inline the max_size size variable is set > to min(max_size, PAGE_SIZE) and only max_size of output data are > decompressed. > > The code

Re: BTRFS: error (device dm-2) in btrfs_run_delayed_refs:2960: errno=-17 Object already exists (since 3.4 / 2012)

2017-08-29 Thread Josef Bacik
How much metadata do you have on this fs? I was going to hold everything in bpf hash trees, but I’m worried we’ll hit collisions and then the tracing will be useless. If it’s too big I’ll have to dump everything to userspace and let python take care of keeping everything in memory, so if you h

Can a compressed file extent have non-zero offset?

2017-08-29 Thread Marek Behun
Hello, I cannot find this in the documentation (and the sources are too long), so I am trying here: can a file_extent_item with item.type == BTRFS_FILE_EXTENT_REG and item.compression != BTRFS_COMPRESS_NONE have non zero offset (item.offset != 0) ? What does it mean in such a case? That com

[PATCH] btrfs: remove BTRFS_FS_QUOTA_DISABLING flag

2017-08-29 Thread Misono, Tomohiro
Currently, "btrfs quota enable" would fail after "btrfs quota disable" on the first time with syslog output "qgroup_rescan_init failed with -22", but it would succeed on the second time. When "quota disable" is called, BTRFS_FS_QUOTA_DISABLING flag bit will be set in fs_info->flags in btrfs_quota

[PATCH] btrfs/029: fix wrong usage of name filter

2017-08-29 Thread Misono, Tomohiro
btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and $SCRATCH_MNT directory. In this function, it calls both _filter_test_dir and _filter_scratch concatenated by pipe. Therefore if $TEST_DIR is a prefix of $SCRATCH_MNT, this filter function gives wrong filtered name for $SCRATCH_

Re: BTRFS: error (device dm-2) in btrfs_run_delayed_refs:2960: errno=-17 Object already exists (since 3.4 / 2012)

2017-08-29 Thread Marc MERLIN
On Tue, Aug 29, 2017 at 06:22:38PM +, Josef Bacik wrote: > How much metadata do you have on this fs? I was going to hold everything in > bpf hash trees, but I’m worried we’ll hit collisions and then the tracing > will be useless. If it’s too big I’ll have to dump everything to userspace >

Re: [PATCH] btrfs: remove BTRFS_FS_QUOTA_DISABLING flag

2017-08-29 Thread Misono, Tomohiro
Sorry, this patch contains leading spaces, I will resend this soon. On 2017/08/30 10:51, Misono, Tomohiro wrote: > Currently, "btrfs quota enable" would fail after "btrfs quota disable" on > the first time with syslog output "qgroup_rescan_init failed with -22", but > it would succeed on the secon

Re: [PATCH] btrfs/029: fix wrong usage of name filter

2017-08-29 Thread Misono, Tomohiro
Sorry, this patch contains leading spaces, I will resend this soon. On 2017/08/30 11:44, Misono, Tomohiro wrote: > btrfs/029 uses _filter_testdirs() to filter the name of $TEST_DIR and > $SCRATCH_MNT directory. > > In this function, it calls both _filter_test_dir and _filter_scratch > concatenate