Re: [PATCH v3] btrfs: fiemap: Cache and merge fiemap extent before submit it to user

2017-04-19 Thread Qu Wenruo
At 04/20/2017 10:08 AM, Liu Bo wrote: On Thu, Apr 20, 2017 at 09:52:00AM +0800, Qu Wenruo wrote: At 04/20/2017 09:25 AM, Liu Bo wrote: On Fri, Apr 07, 2017 at 10:43:15AM +0800, Qu Wenruo wrote: [BUG] Cycle mount btrfs can cause fiemap to return different result. Like: # mount /dev/vdb5

Re: [PATCH v3] btrfs: fiemap: Cache and merge fiemap extent before submit it to user

2017-04-19 Thread Qu Wenruo
At 04/20/2017 09:58 AM, Liu Bo wrote: On Thu, Apr 20, 2017 at 09:52:00AM +0800, Qu Wenruo wrote: At 04/20/2017 09:25 AM, Liu Bo wrote: On Fri, Apr 07, 2017 at 10:43:15AM +0800, Qu Wenruo wrote: [BUG] Cycle mount btrfs can cause fiemap to return different result. Like: # mount /dev/vdb5

Re: [PATCH v3] btrfs: fiemap: Cache and merge fiemap extent before submit it to user

2017-04-19 Thread Liu Bo
On Thu, Apr 20, 2017 at 09:52:00AM +0800, Qu Wenruo wrote: > > > At 04/20/2017 09:25 AM, Liu Bo wrote: > > On Fri, Apr 07, 2017 at 10:43:15AM +0800, Qu Wenruo wrote: > > > [BUG] > > > Cycle mount btrfs can cause fiemap to return different result. > > > Like: > > > # mount /dev/vdb5 /mnt/btrfs

Re: [PATCH v3] btrfs: fiemap: Cache and merge fiemap extent before submit it to user

2017-04-19 Thread Liu Bo
On Thu, Apr 20, 2017 at 09:52:00AM +0800, Qu Wenruo wrote: > > > At 04/20/2017 09:25 AM, Liu Bo wrote: > > On Fri, Apr 07, 2017 at 10:43:15AM +0800, Qu Wenruo wrote: > > > [BUG] > > > Cycle mount btrfs can cause fiemap to return different result. > > > Like: > > > # mount /dev/vdb5 /mnt/btrfs

Re: [PATCH v3] btrfs: fiemap: Cache and merge fiemap extent before submit it to user

2017-04-19 Thread Qu Wenruo
At 04/20/2017 09:25 AM, Liu Bo wrote: On Fri, Apr 07, 2017 at 10:43:15AM +0800, Qu Wenruo wrote: [BUG] Cycle mount btrfs can cause fiemap to return different result. Like: # mount /dev/vdb5 /mnt/btrfs # dd if=/dev/zero bs=16K count=4 oflag=dsync of=/mnt/btrfs/file # xfs_io -c "fiemap

Re: [PATCH v3] btrfs: fiemap: Cache and merge fiemap extent before submit it to user

2017-04-19 Thread Liu Bo
On Fri, Apr 07, 2017 at 10:43:15AM +0800, Qu Wenruo wrote: > [BUG] > Cycle mount btrfs can cause fiemap to return different result. > Like: > # mount /dev/vdb5 /mnt/btrfs > # dd if=/dev/zero bs=16K count=4 oflag=dsync of=/mnt/btrfs/file > # xfs_io -c "fiemap -v" /mnt/btrfs/file >

Re: [PATCH 0/9] Introduce btrfs-modify prog to make corruption easier

2017-04-19 Thread Qu Wenruo
At 04/20/2017 02:15 AM, David Sterba wrote: On Mon, Apr 17, 2017 at 11:26:33AM +0800, Qu Wenruo wrote: Introduce a new command, btrfs-modify, which is not part of 'btrfs', but an independent command, bring minimal impact to existing btrfs commands. Btrfs-modify is designed to provides better

[PATCH ping] btrfs: warn about RAID5/6 being experimental at mount time

2017-04-19 Thread Adam Borowski
Too many people come complaining about losing their data -- and indeed, there's no warning outside a wiki and the mailing list tribal knowledge. Message severity chosen for consistency with XFS -- "alert" makes dmesg produce nice red background which should get the point across. Signed-off-by:

Re: [PATCH] Btrfs: send, fix file hole not being preserved due to inline extent

2017-04-19 Thread Liu Bo
On Thu, Apr 06, 2017 at 05:07:56PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > Normally we don't have inline extents followed by regular extents, but > there's currently at least one harmless case where this happens. For > example, when the page size is 4Kb and

Re: [PATCH 0/9] Introduce btrfs-modify prog to make corruption easier

2017-04-19 Thread David Sterba
On Mon, Apr 17, 2017 at 11:26:33AM +0800, Qu Wenruo wrote: > Introduce a new command, btrfs-modify, which is not part of 'btrfs', but > an independent command, bring minimal impact to existing btrfs commands. > > Btrfs-modify is designed to provides better documentation than current >

Re: Btrfs/SSD

2017-04-19 Thread Chris Murphy
On Mon, Apr 17, 2017 at 4:55 PM, Hans van Kranenburg wrote: > On 04/17/2017 09:22 PM, Imran Geriskovan wrote: >> [...] >> >> Going over the thread following questions come to my mind: >> >> - What exactly does btrfs ssd option does relative to plain mode? > >

Reporting and monitoring storage events (blog)

2017-04-19 Thread Chris Murphy
http://www-rhstorage.rhcloud.com/blog/vpodzime/reporting-and-monitoring-storage-events I think the most useful part of this would be standardized messaging. For the exact same defect state on disk (data corruption), I get two different formatted messages depending on whether it's found passively

Re: [PATCH v2] btrfs-progs: send-dump: always print a space after path

2017-04-19 Thread David Sterba
On Tue, Apr 11, 2017 at 12:33:40PM -0400, Evan Danaher wrote: > I was shocked to discover that 'btrfs receive --dump' doesn't print a > space after long filenames, so it runs together into the metadata; for > example: > > truncate./20-00-03/this-name-is-32-characters-longsize=0 > > This

Re: [PATCH v2] btrfs-progs: send-dump: always print a space after path

2017-04-19 Thread David Sterba
On Thu, Apr 13, 2017 at 10:38:02AM -0400, Noah Massey wrote: > On Wed, Apr 12, 2017 at 7:05 PM, Duncan <1i5t5.dun...@cox.net> wrote: > > Evan Danaher posted on Tue, 11 Apr 2017 12:33:40 -0400 as excerpted: > > > >> I was shocked to discover that 'btrfs receive --dump' doesn't print a > >> space

Re: [PATCH] btrfs-progs: send-dump: always print a space after path

2017-04-19 Thread David Sterba
On Tue, Apr 11, 2017 at 09:49:02AM -0400, Evan Danaher wrote: > Thanks for catching that! I overthought this and managed to convince > myself that it was correct as it stood. > > Should I re-send the whole patch with that change? This is my first > attempt at contributing to a project managed

Re: [PATCH v4] btrfs-progs: misc-tests: Superblock corruption and recovery using backup

2017-04-19 Thread David Sterba
On Sat, Apr 15, 2017 at 03:43:08PM +0530, Lakshmipathi.G wrote: > Signed-off-by: Lakshmipathi.G Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] btrfs-progs: docs: Fix newlines for man btrfstune

2017-04-19 Thread David Sterba
On Sun, Apr 16, 2017 at 07:20:02PM +0200, Hans van Kranenburg wrote: > A bunch of newlines were missing, which resulted in only -S and -r to > show as option after xmlto is used to convert the documentation to a man > page. > > The rest of the options would end up being appended to the

Re: [PATCH 1/2] btrfs-progs: dump-super: check array_size in print_sys_chunk_array

2017-04-19 Thread David Sterba
On Wed, Apr 05, 2017 at 04:59:14PM +0800, Lu Fengqi wrote: > Without validation of array_size, the dump-super may lead to a bad > memory access. > > Signed-off-by: Lu Fengqi > --- > cmds-inspect-dump-super.c | 15 +++ > 1 file changed, 11 insertions(+), 4

"No such entry" recurring error

2017-04-19 Thread Tadeáš Berkman
Hello, i have btrfs on my root partition (openSUSE Tumbleweed) for a year and half, but recently i've ran into the following issue - after an attempt to restore a snapper snapshot the system stopped booting, claiming: > BTRFS: error (device sda3) in __btrfs_free_extent:6944: errno=-2 no such

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-19 Thread Goldwyn Rodrigues
On 04/19/2017 01:45 AM, Christoph Hellwig wrote: > >> +if (bio->bi_opf & REQ_NOWAIT) { >> +if (!blk_queue_nowait(q)) { >> +err = -EOPNOTSUPP; >> +goto end_io; >> +} >> +if (!(bio->bi_opf & REQ_SYNC)) { > > I don't

[PATCH] Tidy while loop in end_compressed_writeback

2017-04-19 Thread Sahil Kang
Hi, This is my first patch so it's a minor code change. I think removing the early continue from the loop makes the function a little easier to follow. Please have a look and I'd appreciate any feedback. Thanks, Sahil From 98afe83a570180e841fefe3fd48d450accc42ea3 Mon Sep 17 00:00:00 2001

[PULL] Btrfs, updates for 4.12

2017-04-19 Thread David Sterba
Hi, this is the main part of my 4.12 pull, condensed changelog below. I might send another pull with low-risk patches, mostly cleanups, but so far I'm done with base testing now. We had a high-churn cycle last time, so this could be small one and we can concentrate on testing & fixing the raid56

Re: [PATCH 2/8] nowait aio: Introduce RWF_NOWAIT

2017-04-19 Thread Jan Kara
On Wed 19-04-17 05:30:24, Goldwyn Rodrigues wrote: > > > On 04/19/2017 01:39 AM, Christoph Hellwig wrote: > > > >> @@ -1593,6 +1593,11 @@ static int io_submit_one(struct kioctx *ctx, struct > >> iocb __user *user_iocb, > >>} > >> > >>req->common.ki_flags |=

Re: [PATCH 2/8] nowait aio: Introduce RWF_NOWAIT

2017-04-19 Thread Goldwyn Rodrigues
On 04/19/2017 01:39 AM, Christoph Hellwig wrote: > >> @@ -1593,6 +1593,11 @@ static int io_submit_one(struct kioctx *ctx, struct >> iocb __user *user_iocb, >> } >> >> req->common.ki_flags |= iocb_rw_flags(iocb->aio_rw_flags); >> +if ((req->common.ki_flags & IOCB_NOWAIT) && >> +

Re: btrfs check --check-data-csum malfunctioning?

2017-04-19 Thread Henk Slager
> At 04/18/2017 08:41 PM, Werner Braun wrote: >> >> Hi, >> >> i have a WD WD40EZRX with strange beaviour off btrfs check vs. btrfs scrub >> >> running btrfs check --check-data-csum returns no errors on the disk >> >> running btrfs scrub on the disk finds tons of errors >> >> i could clear the disk

Re: [PATCH 4/8] nowait-aio: Introduce IOMAP_NOWAIT

2017-04-19 Thread Jan Kara
On Fri 14-04-17 07:02:53, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps. > This is used by XFS in the XFS patch. Goldwyn, the patch is missing your Signed-off-by...

Re: [PATCH 7/8] nowait aio: xfs

2017-04-19 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-19 Thread Christoph Hellwig
On Fri, Apr 14, 2017 at 07:02:54AM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > A new bio operation flag REQ_NOWAIT is introduced to identify bio's s/bio/block/ > @@ -1232,6 +1232,11 @@ static struct request *get_request(struct > request_queue *q, unsigned

Re: [PATCH 4/8] nowait-aio: Introduce IOMAP_NOWAIT

2017-04-19 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/8] nowait aio: Introduce RWF_NOWAIT

2017-04-19 Thread Christoph Hellwig
> } > > - > /* prevent overflows */ Weird whitespace change. > @@ -1593,6 +1593,11 @@ static int io_submit_one(struct kioctx *ctx, struct > iocb __user *user_iocb, > } > > req->common.ki_flags |= iocb_rw_flags(iocb->aio_rw_flags); > + if ((req->common.ki_flags &

Re: [PATCH 1/8] Use RWF_* flags for AIO operations

2017-04-19 Thread Christoph Hellwig
On Fri, Apr 14, 2017 at 07:02:50AM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > RWF_* flags is used for preadv2/pwritev2 calls. Port to use > it for aio operations as well. For this, aio_rw_flags is > introduced in struct iocb (using aio_reserved1) which will