Re: UBSAN: Undefined behaviour in fs/btrfs/inode.c:5845:10

2016-01-26 Thread David Sterba
On Tue, Jan 26, 2016 at 10:13:33AM +, Chris Bainbridge wrote: > Booting 4.5.0-rc1 with new UBSAN checker enabled: > > [3.859690] > > [3.859694] UBSAN: Undefined behaviour in fs/btrfs/inode.c:5845:10 > [

Re: [PATCH 3/3 v2] btrfs: use list_for_each_entry* in backref.c

2016-01-05 Thread David Sterba
On Mon, Dec 21, 2015 at 11:50:23PM +0800, Geliang Tang wrote: > Use list_for_each_entry*() to simplify the code. > > Signed-off-by: Geliang Tang Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH 2/3] btrfs: use list_for_each_entry_safe in free-space-cache.c

2016-01-05 Thread David Sterba
On Fri, Dec 18, 2015 at 10:17:00PM +0800, Geliang Tang wrote: > Use list_for_each_entry_safe() instead of list_for_each_safe() to > simplify the code. > > Signed-off-by: Geliang Tang Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe lin

Re: [PATCH 1/3] btrfs: use list_for_each_entry* in check-integrity.c

2016-01-05 Thread David Sterba
On Fri, Dec 18, 2015 at 10:16:59PM +0800, Geliang Tang wrote: > Use list_for_each_entry*() instead of list_for_each*() to simplify > the code. > > Signed-off-by: Geliang Tang Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&

Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size

2016-01-05 Thread David Sterba
On Wed, Dec 30, 2015 at 04:21:47PM -0500, Sanidhya Solanki wrote: > On Wed, 30 Dec 2015 17:17:22 +0100 > David Sterba wrote: > > > Let me note that a good reputation is also built from patch reviews > > (hint hint). > > Unfortunately, not too many patches co

Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size

2016-01-05 Thread David Sterba
On Thu, Dec 31, 2015 at 08:46:36AM +0800, Qu Wenruo wrote: > > Let me note that a good reputation is also built from patch reviews > > (hint hint). > > I must admit I'm a bad reviewer. > As when I review something, I always has an eager to rewrite part or all > the patch to follow my idea, even i

Re: [PATCH] BTRFS: Runs the xor function if a Block has failed

2016-01-05 Thread David Sterba
On Wed, Dec 30, 2015 at 09:15:44PM -0500, Sanidhya Solanki wrote: > On Wed, 30 Dec 2015 18:18:26 +0100 > David Sterba wrote: > > > That's just the comment copied, the changelog does not explain why > > it's ok to do just the run_xor there. It does not seem trivial

Re: [PATCH] BTRFS: Runs the xor function if a Block has failed

2015-12-30 Thread David Sterba
On Wed, Dec 30, 2015 at 01:28:36AM -0500, Sanidhya Solanki wrote: > The patch adds the xor function after the P stripe > has failed, without bad data or the Q stripe. That's just the comment copied, the changelog does not explain why it's ok to do just the run_xor there. It does not seem trivial t

Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size

2015-12-30 Thread David Sterba
On Wed, Dec 30, 2015 at 10:10:44PM +0800, Qu Wenruo wrote: > Now I am on the same side of David. > Which means a runtime interface to change them. (along with mkfs option) > > If provide some configurable features, then it should be able to be > tuned at both right time and mkfs time. > Or, just

Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size

2015-12-30 Thread David Sterba
On Wed, Dec 30, 2015 at 06:15:23AM -0500, Sanidhya Solanki wrote: > Only one problem. I do not run BTRFS on my systems nor do I have a > RAID setup, due to possessing a limited number of free drives. So, while > I may be able to code for it, I will not be able to test it. I will need > the communit

Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size

2015-12-29 Thread David Sterba
On Tue, Dec 29, 2015 at 06:15:12AM -0500, Sanidhya Solanki wrote: > On Tue, 29 Dec 2015 14:39:07 +0100 > David Sterba wrote: > > > The stripe size depends on how the filesystem was made, at the moment > > the stripesize parameter is missing from mkfs. The kernel module &

Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size

2015-12-29 Thread David Sterba
On Mon, Dec 28, 2015 at 07:24:11AM -0500, Sanidhya Solanki wrote: > An option to select the RAID Stripe size is made > available in the BTRFS Filesystem, via an option > in the BTRFS Config setup, with minimal change > to the existing code base. The stripe size depends on how the filesystem was ma

Re: [PATCH 05/10] btrfs: Use xattr handler infrastructure

2015-12-01 Thread David Sterba
On Mon, Nov 30, 2015 at 10:43:38PM +0100, Andreas Gruenbacher wrote: > Use the VFS xattr handler infrastructure and get rid of similar code in > the filesystem. > > Signed-off-by: Andreas Gruenbacher > Cc: Chris Mason > Cc: Josef Bacik > Cc: David Sterba Reviewed-by

Re: [PATCH] btrfs: use kbasename in btrfsic_mount

2015-11-27 Thread David Sterba
On Fri, Nov 27, 2015 at 09:11:31AM +0100, Rasmus Villemoes wrote: > This is more readable. > > Signed-off-by: Rasmus Villemoes Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

Re: [RFC PATCH 3/3] x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros

2015-11-10 Thread David Sterba
stra > Cc: Matt Mackall > Cc: Chris Mason > Cc: Josef Bacik > Cc: David Sterba Acked-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kern

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 01:05:13PM +0100, Thomas Rohwer wrote: > Investigating the source, I noticed that probably the problem is the member > clone_sources in the structure That's, right. Yet another thing to keep in mind when designing ioctls. > struct btrfs_ioctl_send_args { >__s64 send_f

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread David Sterba
On Thu, Oct 29, 2015 at 08:22:34AM +, Luke Dashjr wrote: > > > I don't see what is different with that implementation. All > > > f2fs_compat_ioctl does is change cmd to the plain-IOC equivalent and > > > call f2fs_ioctl with the same arg (compat_ptr merely causes a cast to > > > void* and back,

Re: [PATCHv2] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-10-29 Thread David Sterba
l.org Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] btrfs: pass proper enum type to start_transaction()

2015-10-27 Thread David Sterba
On Sun, Oct 25, 2015 at 07:35:44PM +, Alexandru Moise wrote: > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

Re: [PATCH 1/1] btrfs/file.c: remove an unsed varialbe first_index

2015-10-21 Thread David Sterba
On Mon, Sep 21, 2015 at 11:40:57AM +0800, Shan Hai wrote: > From: Shan Hai > > The commit b37392ea86761 ("Btrfs: cleanup unnecessary parameter > and variant of prepare_pages()") makes it redundant. > > Signed-off-by: Shan Hai Reviewed-by: David Sterba -- To unsu

Re: [PATCH v2] btrfs: cleanup btrfs_balance profile validity checks

2015-10-21 Thread David Sterba
On Tue, Sep 22, 2015 at 08:02:25PM +, Alexandru Moise wrote: > Improve readability by generalizing the profile validity checks. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David Sterba -- To unsubscribe from this list: send the line &qu

Re: [PATCH] btrfs: fix waitqueue_active without memory barrier in btrfs

2015-10-09 Thread David Sterba
On Fri, Oct 09, 2015 at 12:35:48AM +, Kosuke Tatsukawa wrote: > This patch removes the call to waitqueue_active() leaving just wake_up() > behind. This fixes the problem because the call to spin_lock_irqsave() > in wake_up() will be an ACQUIRE operation. Either we can switch it to wake_up or

Re: [PATCH] btrfs: fix a comment typo

2015-10-07 Thread David Sterba
On Sun, Oct 04, 2015 at 05:05:32PM +0800, Geliang Tang wrote: > Just fix a typo in the code comment. For this kind of changes please CC the 'trivial' tree triv...@kernel.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel

Re: [PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check

2015-09-29 Thread David Sterba
On Mon, Sep 28, 2015 at 09:39:00PM +0800, Yaowei Bai wrote: > As new_valid_dev always returns 1, so !new_valid_dev check is not > needed, remove it. > > Signed-off-by: Yaowei Bai Acked-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&

Re: [PATCH] btrfs: remove unneeded NULL initializer for struct fs_path

2015-09-29 Thread David Sterba
On Sat, Sep 26, 2015 at 12:05:19PM +, Alexandru Moise wrote: > fs_path_alloc() either returns an alloc'ed struct fs_path > or NULL, no need to initialize the pointer to NULL. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> > --- > fs/btrfs/send.c | 2 +- > 1 file changed, 1

Re: [PATCH v2 2/2] btrfs: reada: Fix returned errno code

2015-09-25 Thread David Sterba
Also, updating the caller to return the exact value from > reada_add_block. > > Smatch tool warning: > reada_add_block() warn: returning -1 instead of -ENOMEM is sloppy > > Signed-off-by: Luis de Bethencourt Reviewed-by: David Sterba -- To unsubscribe from this list: send the l

Re: [PATCH v2 1/2] btrfs: change num_items type from u64 to unsigned int

2015-09-23 Thread David Sterba
flush() as well. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kerne

Re: [PATCH v2 2/2] btrfs: declare rsv_count as unsigned int instead of int

2015-09-23 Thread David Sterba
> Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info

Re: [PATCH 0/2] btrfs: Fix returned errno codes

2015-09-23 Thread David Sterba
On Tue, Sep 22, 2015 at 05:29:37PM +0100, Luis de Bethencourt wrote: > These two patches fix instances where -1 is used to specify a buffer > allocation fail, instead of using -ENOMEM. > > I could merge the two patches into one if that's more appropriate. No, it's better to change them separately

Re: [PATCH 1/2] btrfs: check-integrity: Fix returned errno codes

2015-09-23 Thread David Sterba
turning -1 instead of -ENOMEM is sloppy > > Signed-off-by: Luis de Bethencourt Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/major

Re: [PATCH 2/2] btrfs: reada: Fix returned errno code

2015-09-23 Thread David Sterba
On Tue, Sep 22, 2015 at 05:29:39PM +0100, Luis de Bethencourt wrote: > reada is using -1 instead of the -ENOMEM defined macro to specify that > a buffer allocation failed. Since the error number is propagated, the > caller will get a -EPERM which is the wrong error condition. > > Smatch tool warni

Re: [PATCH 1/2] btrfs: avoid passing int param to start_transaction which takes u64

2015-09-22 Thread David Sterba
On Tue, Sep 22, 2015 at 04:33:07PM +0300, Alexandru Moise wrote: > > I think it's better to do it the other way around, ie. let all the > > equivalents of 'num_items' be an int. We know that this is a small > > number, using u64 for that is an overkill. As the number is always > > positive, please

Re: [PATCH] btrfs: memset cur_trans->delayed_refs to zero

2015-09-22 Thread David Sterba
On Tue, Sep 22, 2015 at 04:19:36PM +0300, Alexandru Moise wrote: > Alright, do you want me to resend it with the different subject tag > or shall I just keep that in mind for future patches? No need to resend. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: [PATCH 1/2] btrfs: avoid passing int param to start_transaction which takes u64

2015-09-22 Thread David Sterba
On Sun, Sep 13, 2015 at 06:47:20PM +, Alexandru Moise wrote: > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> > --- > v2: Forgot to add transaction.h when I made the commit, many thanks > Holger for pointing it out. > > fs/btrfs/transaction.c | 2 +- > fs/btrfs/transaction.h |

Re: [PATCH] btrfs: memset cur_trans->delayed_refs to zero

2015-09-22 Thread David Sterba
On Mon, Sep 07, 2015 at 05:24:37PM +0300, Alexandru Moise wrote: > Use memset() to null out the btrfs_delayed_ref_root of > btrfs_transaction instead of setting all the members to 0 by hand. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David S

Re: [PATCH] btrfs: use a single if() statement for one outcome in get_block_rsv()

2015-09-22 Thread David Sterba
On Wed, Sep 09, 2015 at 12:18:50AM +, Alexandru Moise wrote: > Rather than have three separate if() statements for the same outcome > we should just OR them together in the same if() statement. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewe

Re: [PATCH] btrfs: cleanup btrfs_balance profile validity checks

2015-09-22 Thread David Sterba
On Sun, Aug 30, 2015 at 09:45:49PM +, Alexandru Moise wrote: > Improve readability by generalizing the profile validity checks, > I had to read through those if statements half a dozen times on my > first try just to get an idea of what's happening there. > > Signed-off-by: Alexandru Moise <00

Re: [PATCH 06/39] Btrfs: drop null test before destroy functions

2015-09-14 Thread David Sterba
stroy\|dma_pool_destroy\)(x); > // > > Signed-off-by: Julia Lawall Acked-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/ma

Re: [PATCH] btrfs: memset cur_trans->delayed_refs to zero

2015-09-07 Thread David Sterba
So, updated patches should mention that in the subject eg: [PATCH v2] btrfs: memset cur_trans->delayed_refs to zero On Mon, Sep 07, 2015 at 04:45:02PM +0300, Alexandru Moise wrote: > Use memset() to null out the btrfs_delayed_ref_root of > btrfs_transaction instead of setting all the members to 0

Re: [PATCH] btrfs: memset cur_trans->delayed_refs to zero

2015-09-07 Thread David Sterba
On Sun, Sep 06, 2015 at 12:25:27PM +, Alexandru Moise wrote: > Use memset() to null out the btrfs_delayed_ref_root of > btrfs_transaction instead of setting all the members to 0 by hand. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> > --- > fs/btrfs/transaction.c | 10 +--

Re: [PATCH] btrfs: trimming some start_transaction() code away

2015-08-28 Thread David Sterba
erformance gain is arguable but the generated code should be smaller, which counts. Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/maj

Re: [PATCH] btrfs: Fixed dsize and last_off declarations

2015-08-27 Thread David Sterba
Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] btrfs: Fixed declaration of old_len

2015-08-25 Thread David Sterba
ged old_len to be of type u32 as well. > > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com> Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More ma

Re: [RFC 8/8] btrfs: use __GFP_NOFAIL in alloc_btrfs_bio

2015-08-05 Thread David Sterba
t; [ 37.928625] kernel BUG at fs/btrfs/extent_io.c:4045 > > This is clearly undesirable and the nofail behavior should be explicit > if the allocation failure cannot be tolerated. > > Signed-off-by: Michal Hocko Reviewed-by: David Sterba -- To unsubscribe from this list: send

Re: [RFC 7/8] btrfs: Prevent from early transaction abort

2015-08-05 Thread David Sterba
On Wed, Aug 05, 2015 at 11:51:23AM +0200, mho...@kernel.org wrote: > From: Michal Hocko ... > Fix this by reintroducing the no-fail behavior of this allocation path > with the explicit __GFP_NOFAIL. > > Signed-off-by: Michal Hocko Reviewed-by: David Sterba -- To unsubscribe

Re: [PATCH trivial] Btrfs: Spelling s/consitent/consistent/

2015-07-09 Thread David Sterba
On Mon, Jul 06, 2015 at 03:38:11PM +0200, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven Acked-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [GIT PULL] Btrfs

2015-06-26 Thread David Sterba
On Tue, Jun 02, 2015 at 10:02:49AM -0400, Josh Boyer wrote: > >>> Chris Mason (1) commits (+18/-0): > >>> Btrfs: fix regression in raid level conversion > >> > >> Shouldn't this be CC'd to stable since it fixes a broken commit in 4.0? > > > > Yes, I'm retesting two of these against 4.0 > > Did

Re: [PATCH 1/1] Btrfs: Remove redundant NULL check before kfree

2015-06-23 Thread David Sterba
On Tue, Jun 23, 2015 at 11:28:00AM +0530, Maninder Singh wrote: > There is no need of NULL check before kfree, > removing the same > > Signed-off-by: Maninder Singh > Reviewed-by: Akhilesh Kumar Reviewed-by: David Sterba -- To unsubscribe from this list: send the line &qu

Re: [4.1-rc7] btrfs related VM_BUG_ON in filemap.c

2015-06-16 Thread David Sterba
On Wed, Jun 10, 2015 at 01:43:31PM -0400, Chris Mason wrote: > On 06/10/2015 09:40 AM, Dave Jones wrote: > > Found this on serial console this morning. The machine had rebooted itself > > shortly > > afterwards (surprising, given I don't have panic-on-oops or similar set). > > > > We had one oth

Re: [PATCH 2/2 linux-next] btrfs: use swap() in merge_ref()

2015-05-19 Thread David Sterba
On Mon, May 18, 2015 at 07:24:13PM +0200, Fabian Frederick wrote: > Use kernel.h macro definition. > > Signed-off-by: Fabian Frederick Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

Re: [PATCH 1/2 linux-next] btrfs: use swap() in __merge_refs

2015-05-19 Thread David Sterba
On Mon, May 18, 2015 at 07:24:12PM +0200, Fabian Frederick wrote: > Use kernel.h macro definition. > > Signed-off-by: Fabian Frederick Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-05-15 Thread David Sterba
On Thu, May 14, 2015 at 04:27:54PM +, Luke Dashjr wrote: > On Thursday, May 14, 2015 2:06:17 PM David Sterba wrote: > > On Wed, May 13, 2015 at 05:15:26PM +, Luke Dashjr wrote: > > > 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They > > > ca

Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl

2015-05-14 Thread David Sterba
On Wed, May 13, 2015 at 05:15:26PM +, Luke Dashjr wrote: > 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can > be > handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr fail. Yes, but this has to be implemented in another way. See eg. https://git.k

Re: [PATCH] btrfs: use after free when closing devices

2015-05-13 Thread David Sterba
On Tue, May 12, 2015 at 07:31:37PM -0400, Sasha Levin wrote: > __btrfs_close_devices() would call_rcu to free the device, which is racy with > list_for_each_entry() accessing the memory to retrieve the next device on the > list. > > Signed-off-by: Sasha Levin Reviewed-by: Davi

Re: [patch v2] checkpatch: complain about GW-BASIC style label names

2015-05-13 Thread David Sterba
On Wed, May 13, 2015 at 03:37:12PM +0300, Dan Carpenter wrote: > GW-BASIC style label names are annoying so we can warn about that in > checkpatch. The warnings look like: > > WARNING: 'fail2' isn't informative - prefer descriptive label names > #267: FILE: ./sound/ppc/beep.c:267: >

Re: [PATCH v2 4/6] Btrfs: fail on mismatched subvol and subvolid mount options

2015-05-11 Thread David Sterba
> users to pass in both if they do match (which they could, for example, > get out of /proc/mounts). > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord.

Re: [PATCH v2 5/6] Btrfs: unify subvol= and subvolid= mounting

2015-05-11 Thread David Sterba
stem trees. > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 6/6] Btrfs: show subvol= and subvolid= in /proc/mounts

2015-05-11 Thread David Sterba
> Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 3/6] Btrfs: clean up error handling in mount_subvol()

2015-05-11 Thread David Sterba
On Thu, Apr 09, 2015 at 02:34:53PM -0700, Omar Sandoval wrote: > In preparation for new functionality in mount_subvol(), give it > ownership of subvol_name and tidy up the error paths. > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: s

Re: [PATCH v2 2/6] Btrfs: remove all subvol options before mounting top-level

2015-05-11 Thread David Sterba
bvolid= options, then append subvolid=0 to the end. This > implicitly makes subvol= take precedence over subvolid=, but we're about > to add a stricter check for that. This also makes setup_root_args() more > generic, which we'll need soon. > > Signed-off-by: Omar Sandoval

Re: [PATCH v2 1/6] Btrfs: lock superblock before remounting for rw subvol

2015-05-11 Thread David Sterba
> Fixes: 0723a0473fb4 ("btrfs: allow mounting btrfs subvolumes with different > ro/rw options") > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...

Re: [PATCH v2 5/6] Btrfs: unify subvol= and subvolid= mounting

2015-05-11 Thread David Sterba
On Thu, Apr 09, 2015 at 02:34:55PM -0700, Omar Sandoval wrote: > @@ -1321,7 +1438,7 @@ static struct dentry *btrfs_mount(struct > file_system_type *fs_type, int flags, > return ERR_PTR(error); > } > > - if (subvol_name) { > + if (subvol_name || subvol_objectid != BTRF

Re: [PATCH v2 0/6] Btrfs: show subvolume name and ID in /proc/mounts

2015-05-11 Thread David Sterba
On Mon, May 11, 2015 at 02:42:58AM -0700, Omar Sandoval wrote: > Sorry for the long-winded email! Thoughts, David, Qu? I'm ok with the approach and the patchset as a whole. There was one minor issue with the aliasing of the toplevel subvolume (id 0 or 5). I'll post a comment to the patch. -- To un

Re: [PATCH 1/3] BTRFS: support NFSv2 export

2015-05-11 Thread David Sterba
and be zero-padded. > > So we must test that fh_len is at least some value, not exactly equal > to it. > > Signed-off-by: NeilBrown Acked-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to m

Re: periodic iowait spike

2015-05-06 Thread David Sterba
On Sun, May 03, 2015 at 12:02:08PM +0200, Toralf Förster wrote: > The picture in [1], created with isag from the sysstat package, shows > a periodic spike in the iowait of my tinderbox server (hardened Gentoo > 3.19.6-r1), correlating to write transactions per seconds from a > similar graph. > > I

Re: [RFC] scripts: kerrno.sh - errno translator

2015-04-30 Thread David Sterba
On Thu, Apr 30, 2015 at 01:29:41PM +0200, Bartosz Golaszewski wrote: > 2015-04-30 13:04 GMT+02:00 Richard Weinberger : > > On Thu, Apr 30, 2015 at 12:53 PM, Bartosz Golaszewski > > wrote: > >> Shell script allowing to find errno definitions and descriptions in the > >> kernel source. > >> > >> Sig

Re: [PATCH v2 4/6] Btrfs: fail on mismatched subvol and subvolid mount options

2015-04-14 Thread David Sterba
On Fri, Apr 10, 2015 at 08:39:53AM +0800, Qu Wenruo wrote: > > There's nothing to stop a user from passing both subvol= and subvolid= > > to mount, but if they don't refer to the same subvolume, someone is > > going to be surprised at some point. Error out on this case, but allow > > users to pass

Re: [PATCH 2/3] Btrfs: unify subvol= and subvolid= mounting

2015-04-09 Thread David Sterba
On Tue, Apr 07, 2015 at 10:34:01PM -0700, Omar Sandoval wrote: > Currently, mounting a subvolume with subvolid= takes a different code > path than mounting with subvol=. This isn't really a big deal except for > the fact that mounts done with subvolid= or the default subvolume don't > have a dentry

Re: [PATCH 2/3] Btrfs: unify subvol= and subvolid= mounting

2015-04-09 Thread David Sterba
On Wed, Apr 08, 2015 at 02:06:14PM +0800, Qu Wenruo wrote: > > > Original Message > Subject: [PATCH 2/3] Btrfs: unify subvol= and subvolid= mounting > From: Omar Sandoval > To: Chris Mason , Josef Bacik , David Sterba > , > Date: 2015年04月08日 13:34 &g

Re: [PATCH 3/3] Btrfs: show subvol= and subvolid= in /proc/mounts

2015-04-09 Thread David Sterba
On Tue, Apr 07, 2015 at 10:34:02PM -0700, Omar Sandoval wrote: > Currently, userspace has no way to know which subvolume is mounted. Oh, there is a way, 'btrfs inspect-internal rootid /path/to/mount', just we'd like to see it in the mount options as well. > But, > now that we're guaranteed to hav

Re: [PATCH V2 linux-next] Btrfs: use BTRFS_COMPRESS_NONE instead of 0

2015-04-07 Thread David Sterba
On Fri, Apr 03, 2015 at 09:50:34PM +0200, Fabian Frederick wrote: > cow_file_range_inline() was called with 0 instead of actual definition. > > btrfs_finish_ordered_io() initialized compress_type with 0 as well. > (Thanks to David Sterba for suggesting this update). > > Sig

Re: [PATCH] Btrfs: prevent deletion of mounted subvolumes

2015-04-02 Thread David Sterba
On Wed, Apr 01, 2015 at 08:49:54PM -0700, Omar Sandoval wrote: > Hm, yeah, that's unfortunate, thanks for pointing that out. It looks > like we can get the subvolume ID reliably: > > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index 05fef19..a74ddb3 100644 > --- a/fs/btrfs/super.c >

Re: [PATCH] Btrfs: prevent deletion of mounted subvolumes

2015-04-01 Thread David Sterba
On Wed, Apr 01, 2015 at 12:03:28AM -0700, Omar Sandoval wrote: > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -1024,6 +1024,10 @@ static int btrfs_show_options(struct seq_file *seq, > struct dentry *dentry) > struct btrfs_root *root = info->tree_root; > char *compress_type; >

Re: [PATCH 1/1 linux-next] Btrfs: use BTRFS_COMPRESS_NONE instead of 0

2015-03-31 Thread David Sterba
On Mon, Mar 30, 2015 at 10:21:11PM +0200, Fabian Frederick wrote: > cow_file_range_inline() was called with 0 instead of > actual definition. Please also fix the initialization in btrfs_finish_ordered_io . -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH] btrfs: unlock i_mutex after attempting to delete subvolume during send

2015-03-30 Thread David Sterba
On Sat, Mar 28, 2015 at 11:37:43AM +, Filipe David Manana wrote: > On Sat, Mar 28, 2015 at 11:02 AM, Omar Sandoval wrote: > > Whenever the check for a send in progress introduced in commit > > 521e0546c970 (btrfs: protect snapshots from deleting during send) is > > hit, we return without unloc

Re: [PATCH] btrfs: unlock i_mutex after attempting to delete subvolume during send

2015-03-30 Thread David Sterba
] btrfs/211 is leaving the kernel with locks still held! > [ +0.29] 1 lock held by btrfs/211: > [ +0.23] #0: (&type->i_mutex_dir_key){+.+.+.}, at: > [] btrfs_ioctl_snap_destroy+0x2df/0x7a0 > > Make sure we unlock it in the error path. > > Signed-off-by: Omar

Re: [PATCH] Btrfs: prevent deletion of mounted subvolumes

2015-03-30 Thread David Sterba
On Mon, Mar 30, 2015 at 02:02:17AM -0700, Omar Sandoval wrote: > Before commit bafc9b754f75 ("vfs: More precise tests in d_invalidate"), > d_invalidate() could return -EBUSY when a dentry for a directory had > more than one reference to it. This is what prevented a mounted > subvolume from being de

Re: How to do Header Dependency Check Properly for Kernel Patch

2015-03-27 Thread David Sterba
On Thu, Mar 26, 2015 at 07:45:07PM -0400, nick wrote: > I have a patch for moving over the rcu-string header file for btrfs to > the standard include headers in include/linux > as you stated this on a to do on the brtfs to do page for the > project's wiki page. The wiki page states that the task i

Re: lz4: fix system halted at boot kernel x86_64 compressed lz4

2015-03-24 Thread David Sterba
On Tue, Mar 24, 2015 at 12:27:25PM +0100, Krzysztof Kolasa wrote: > lz4: fix system halted at boot kernel x86_64 compressed lz4 > > Decompression process ends with an error when loading kernel: > > Decoding failed > -- System halted Serious regression detected ... > > This condition is probab

Re: [PATCH 1/1] btrfs: incorrect handling for fiemap_fill_next_extent return

2015-03-24 Thread David Sterba
ot happen, > according > to manpage of ioctl. > > Signed-off-by: Chengyu Song Good catch, thanks. Reviewed-by: David Sterba Should go to stable. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.o

Re: [PATCH] btrfs: explicitly set control file's private_data

2015-03-24 Thread David Sterba
ry subtle behavior. > > [1] https://lkml.org/lkml/2014/12/4/939 > > Signed-off-by: Martin Kepplinger > Signed-off-by: Tom Van Braeckel Thanks for the explanation. Acked-by: David Sterba > +static int btrfs_control_open(struct inode *inode, struct file *file) > +{ &

Re: [RFC PATCH v3 1/5] new helper: iov_iter_rw()

2015-03-18 Thread David Sterba
On Tue, Mar 17, 2015 at 02:04:02PM -0700, Omar Sandoval wrote: > /* > + * Get one of READ or WRITE out of iter->type without any other flags OR'd in > + * with it. > + * > + * The ?: is just for type safety. > + */ > +#define iov_iter_rw(i) ((0 ? (struct iov_iter *)0 : (i))->type & RW_MASK) I'm f

Re: [RFC PATCH 1/5] new helper: iov_iter_rw()

2015-03-17 Thread David Sterba
On Mon, Mar 16, 2015 at 05:36:05PM +, Al Viro wrote: > On Mon, Mar 16, 2015 at 04:33:49AM -0700, Omar Sandoval wrote: > > Get either READ or WRITE out of iter->type. > > Umm... > > > + * Get one of READ or WRITE out of iter->type without any other flags OR'd > > in > > + * with it. > > + *

Re: [PATCH v2 1/3] btrfs: handle ENOMEM in btrfs_alloc_tree_block

2015-03-13 Thread David Sterba
; Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 2/3] btrfs: fix race on ENOMEM in alloc_extent_buffer

2015-03-13 Thread David Sterba
xists = NULL in the case that we don't use exists to > avoid accidentally returning a freed extent_buffer in an error case. > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: LZ4 : fix the data abort issue.

2015-03-13 Thread David Sterba
0 pc 0x820149bc >[6528]spsr 0x41f3 > and the memory addresses of some variables at the moment are > ref:0xdcea0ffc, op:0xdcea0ffc, oend:0xdcea1000 > > As you can see, COPYLENGH is 8bytes, so @ref and @op can access the momory > over @oend. > > Signed-off

Re: [PATCH v2 0/3] btrfs: ENOMEM bugfixes

2015-03-13 Thread David Sterba
On Wed, Mar 11, 2015 at 09:40:17PM -0700, Omar Sandoval wrote: > Ping. For anyone following along, it looks like commit cc87317726f8 > ("mm: page_alloc: revert inadvertent !__GFP_FS retry behavior change") > reverted the commit that exposed these bugs. Josef said he was okay with > taking these, wi

Re: [PATCH] fs: btrfs: Add missing include file

2015-03-13 Thread David Sterba
due to a missing include file. > > Fixes: 3737c63e1fb0 ("fs: move struct kiocb to fs.h") > Cc: Christoph Hellwig > Signed-off-by: Guenter Roeck Acked-by: David Sterba Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [PATCH] btrfs: fix size_t format string

2015-03-09 Thread David Sterba
On Mon, Mar 09, 2015 at 12:39:36PM +0100, Arnd Bergmann wrote: > This warning has been rather annoying because it shows up in every > 'allmodconfig' build. I assume others have reported it before, but > please apply some fix for it, ideally before 4.0. Sorry about that, we're aware of the warning

Re: [PATCH] Btrfs:__add_inode_ref: out of bounds memory read when looking for extended ref.

2015-03-03 Thread David Sterba
Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] fix spacing in btrfs/inode.c

2015-02-12 Thread David Sterba
On Wed, Feb 11, 2015 at 09:17:22PM -0500, Kevin Mulvey wrote: > This is a patch to inode.c that fixes some spacing errors found by > checkpatch.pl https://btrfs.wiki.kernel.org/index.php/Project_ideas#Cleanup_projects "Please note that pure whitespace and style reformatting changes are not reall

Re: [PATCH] Btrfs: avoid build warning on 32-bit

2015-01-13 Thread David Sterba
On Tue, Jan 13, 2015 at 03:09:03PM +0100, Arnd Bergmann wrote: > A recent change introduced a type cast from a private 64-bit > value to a pointer, which works fine on 64-bit architectures, > but not on 32-bit ones, where it produces a harmless compiler > warning: > > fs/btrfs/extent_io.c: In func

Re: [PATCH] btrfs: transaction: Remove unused function

2015-01-13 Thread David Sterba
On Tue, Jan 13, 2015 at 07:54:06PM +0100, Rickard Strandqvist wrote: > Remove the function btrfs_start_transaction_lflush() that is not used > anywhere. > > This was partially found by using a static code analysis program called > cppcheck. http://thread.gmane.org/gmane.comp.file-systems.btrfs/

Re: [PATCH] Fix NUL (\0 or \x00) specification in string

2015-01-07 Thread David Sterba
On Tue, Jan 06, 2015 at 08:28:04PM +0100, Giel van Schijndel wrote: > On Mon, Jan 05, 2015 at 16:00:26 +0100, David Sterba wrote: > > I'm replying to all your recent patches here as they are fixing things > > reported in http://www.viva64.com/en/b/0299/ . I'ts a good

Re: [PATCH] btrfs: reada: Remove unused function

2015-01-06 Thread David Sterba
On Tue, Jan 06, 2015 at 11:42:07AM +0100, Jiri Kosina wrote: > On Mon, 5 Jan 2015, David Sterba wrote: > > > > Remove the function btrfs_reada_detach() that is not used anywhere. > > > > > > This was partially found by using a static code analys

Re: [PATCH] Fix NUL (\0 or \x00) specification in string

2015-01-05 Thread David Sterba
I'm replying to all your recent patches here as they are fixing things reported in http://www.viva64.com/en/b/0299/ . I'ts a good practice to give the credit the reporter. The blogpost also contains analyses of the issues so it could help reviewing the patches. -- To unsubscribe from this list: se

Re: [PATCH] btrfs: reada: Remove unused function

2015-01-05 Thread David Sterba
On Sun, Jan 04, 2015 at 01:59:57AM +0100, Rickard Strandqvist wrote: > Remove the function btrfs_reada_detach() that is not used anywhere. > > This was partially found by using a static code analysis program called > cppcheck. > > Signed-off-by: Rickard Strandqvist No please, this function is

Re: [RFC PATCH v3 7/7] btrfs: enable swap file support

2014-12-12 Thread David Sterba
On Tue, Dec 09, 2014 at 05:45:48PM -0800, Omar Sandoval wrote: > +static void __clear_swapfile_extents(struct inode *inode) > +{ > + u64 isize = inode->i_size; > + struct extent_map *em; > + u64 start, len; > + > + start = 0; > + while (start < isize) { > + len = isi

Re: [RFC PATCH v3 6/7] btrfs: add EXTENT_FLAG_SWAPFILE

2014-12-12 Thread David Sterba
specifically for this purpose. > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.

Re: [RFC PATCH v3 0/7] btrfs: implement swap file support

2014-12-12 Thread David Sterba
On Tue, Dec 09, 2014 at 05:45:41PM -0800, Omar Sandoval wrote: > After some discussion on the mailing list, I decided that for simplicity and > reliability, it's best to simply disallow COW files and files with shared > extents (like files with extents shared with a snapshot). From a user's > persp

<    1   2   3   4   5   6   7   >