Re: [PATCH 09/12] btrfs-progs: don't deref pipefd[-1]

2013-10-07 Thread Eric Sandeen
that happened. Reviewed-by: Eric Sandeen sand...@redhat.com --- send-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send-test.c b/send-test.c index 3775f5f..a37b7fd 100644 --- a/send-test.c +++ b/send-test.c @@ -354,7 +354,7 @@ static void *process_thread(void

[PATCH] fix up userspace for newer glibc

2010-01-20 Thread Eric Sandeen
sysconf. Also, something used to pull in stat that no longer does, so things like S_ISREG weren't getting defined. The following fixes things for me. Signed-off-by: Eric Sandeen sand...@redhat.com --- Index: btrfs-progs-0.19/btrfsck.c

Re: [PATCH] xfstests: test for atime-related mount options

2014-02-14 Thread Eric Sandeen
On 2/14/14, 10:39 AM, David Sterba wrote: On Thu, Feb 13, 2014 at 10:42:55AM -0600, Eric Sandeen wrote: +cat /proc/mounts | grep $SCRATCH_MNT | grep relatime $seqres.full +[ $? -ne 0 ] echo The relatime mount option should be the default. Ok, I guess relatime in /proc/mounts is from core

Re: [PATCH] xfstests: test for atime-related mount options

2014-02-14 Thread Eric Sandeen
On 2/14/14, 4:24 PM, Dave Chinner wrote: On Fri, Feb 14, 2014 at 10:41:16AM -0600, Eric Sandeen wrote: On 2/14/14, 10:39 AM, David Sterba wrote: On Thu, Feb 13, 2014 at 10:42:55AM -0600, Eric Sandeen wrote: +cat /proc/mounts | grep $SCRATCH_MNT | grep relatime $seqres.full +[ $? -ne 0

Re: [PATCH] xfstests: test for atime-related mount options

2014-02-14 Thread Eric Sandeen
On 2/14/14, 7:39 PM, Dave Chinner wrote: On Fri, Feb 14, 2014 at 05:48:59PM -0600, Eric Sandeen wrote: On 2/14/14, 4:24 PM, Dave Chinner wrote: On Fri, Feb 14, 2014 at 10:41:16AM -0600, Eric Sandeen wrote: On 2/14/14, 10:39 AM, David Sterba wrote: On Thu, Feb 13, 2014 at 10:42:55AM -0600

Re: know mount location with in FS

2014-02-17 Thread Eric Sandeen
On 2/16/14, 9:02 AM, Anand Jain wrote: Hello, I wonder if there is any known way to get the mount point directory name with in the btrfs-kernel ? For what reason? Remember that a single block device can be mounted in multiple places (or bind-mounted, etc), so there is not even

Re: [PATCH v2] xfstests: test for atime-related mount options

2014-02-17 Thread Eric Sandeen
93fd63c2f001ca6797c6b15b696a484b165b4800) I think this looks ok. Only little nit is that _require_relatime now implicitly requires scratch, but *shrug* it was Dave's idea. ;) Thanks! Reviewed-by: Eric Sandeen sand...@redhat.com Signed-off-by: Koen De Wit koen.de@oracle.com --- v1-v2: - Fix typo in _cleanup

Re: [PATCH 1/4] Btrfs-progs: new helper to parse string to u64 for btrfs

2014-02-19 Thread Eric Sandeen
On 2/19/14, 10:31 AM, Goffredo Baroncelli wrote: ... The error message says that the value is out of range. But doesn't tell which is the parameter involved. If you have a command which has several arguments, and the user pass a string instead of a number, the error returned doesn't tell

Re: [PATCH v2 1/4] Btrfs-progs: new helper to parse string to u64 for btrfs

2014-02-19 Thread Eric Sandeen
On 2/19/14, 7:30 PM, Wang Shilong wrote: There are many places that need parse string to u64 for btrfs commands, in fact, we do such things *too casually*, using atoi/atol/atoll..is not right at all, and even we don't check whether it is a valid string. Let's do everything more gracefully,

Re: [PATCH v2 1/4] Btrfs-progs: new helper to parse string to u64 for btrfs

2014-02-20 Thread Eric Sandeen
On 2/19/14, 7:43 PM, Wang Shilong wrote: On 02/20/2014 09:39 AM, Eric Sandeen wrote: On 2/19/14, 7:30 PM, Wang Shilong wrote: ... +/* + * if we pass a negative number to strtoull, + * it will return an unexpected number to us, + * so let's do the check ourselves firstly

Re: [PATCH v4 1/4] Btrfs-progs: new helper to parse string to u64 for btrfs

2014-02-21 Thread Eric Sandeen
parsing arg (just like usage!) Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com I like it, thanks. Reviewed-by: Eric Sandeen sand...@redhat.com --- v3-v4: move prefix '-' check after strtoull call, which will make negative output more precise to common users!(Thanks to Eric

Re: Testing BTRFS

2014-03-11 Thread Eric Sandeen
On 3/10/14, 8:02 PM, Avi Miller wrote: On 11 Mar 2014, at 11:39 am, Lists li...@benjamindsmith.com wrote: Is there a recommended way to do this? Is it anywhere as easy as ZFSonLinux yum install? Oracle Linux 6 with the Unbreakable Enterprise Kernel Release 2 or Release 3 has

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Eric Sandeen
On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. What I came up with (sorted alphabetically) Couchbase (CouchDB) Facebook Fujitsu Fusion-IO

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Eric Sandeen
On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies that contribute code to btrfs. Also... What I came up with (sorted alphabetically) Couchbase (CouchDB) Facebook Fujitsu

Re: Which companies contribute to Btrfs?

2014-04-23 Thread Eric Sandeen
On Apr 23, 2014, at 10:45 PM, Marc MERLIN m...@merlins.org wrote: On Wed, Apr 23, 2014 at 09:30:24PM -0500, Eric Sandeen wrote: On 4/23/14, 8:18 PM, Marc MERLIN wrote: Howdy, I writing slides about btrfs for an upcoming talk (at linuxcon) and I was trying to gather a list of companies

Re: Which companies are using Btrfs in production?

2014-04-28 Thread Eric Sandeen
On 4/25/14, 10:20 AM, Marc MERLIN wrote: On Fri, Apr 25, 2014 at 04:47:04PM +0200, David Sterba wrote: On Thu, Apr 24, 2014 at 04:14:56PM -0700, Marc MERLIN wrote: Netgear uses BTRFS as the filesystem in their refreshed ReadyNAS line. They apparently use Oracle's linux distro so I assume

Re: [PATCH] xfstests: fix flink test

2014-05-07 Thread Eric Sandeen
On 5/7/14, 3:54 PM, Josef Bacik wrote: I don't have flink support in my xfsprogs, but it doesn't fail with command not found or whatever, it fails because I don't have the -T option. So fix _require_xfs_io_command to check for an invalid option and not run. This way I get notrun instead

Re: [PATCH] xfstests: fix flink test V2

2014-05-08 Thread Eric Sandeen
first before it parses the options. So fix this by checking flink with these two cases and don't run if we hit either of them. Thanks, Signed-off-by: Josef Bacik jba...@fb.com Looks good to me, thanks. Reviewed-by: Eric Sandeen sand...@redhat.com --- V1-V2: check for Is a directory

Re: [PATCH] xfstests: filter out selinux xattrs for generic/062

2014-05-09 Thread Eric Sandeen
On 5/9/14, 3:20 PM, Josef Bacik wrote: I have MOUNT_OPTIONS set to something else so I lose the context bit. Thanks, Seems like we need to add to them, then, not overwrite them, for selinux? Otherwise I imagine many other tests will fail. -Eric -- To unsubscribe from this list: send the line

Re: [PATCH] xfstests: fix selinux context handling

2014-05-09 Thread Eric Sandeen
it in the body of common/config Signed-off-by: Josef Bacik jba...@fb.com This makes sense to me... untested, TBH, but I assume you did, so: Reviewed-by: Eric Sandeen sand...@redhat.com At some point it'd probably make sense to figure out which tests actually need this, and put

[PATCH] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-13 Thread Eric Sandeen
Allow the specification of the filesystem UUID at mkfs time. (Implemented only for mkfs.btrfs, not btrfs-convert). Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/btrfs-convert.c b/btrfs-convert.c index a8b2c51..d62d4f8 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c

Re: [PATCH] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-14 Thread Eric Sandeen
On 5/14/14, 2:31 AM, Wang Shilong wrote: On 05/14/2014 09:18 AM, Eric Sandeen wrote: Allow the specification of the filesystem UUID at mkfs time. (Implemented only for mkfs.btrfs, not btrfs-convert). Just out of curiosity, this option is used for what kind of use case? I notice Ext4 also has

Re: [PATCH] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-14 Thread Eric Sandeen
On 5/14/14, 9:39 AM, Goffredo Baroncelli wrote: Hi Eric, On 05/14/2014 03:18 AM, Eric Sandeen wrote: Allow the specification of the filesystem UUID at mkfs time. I suggest to add some warning when this options is used, because the behavior could be very different than the one expected

[PATCH V2] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-14 Thread Eric Sandeen
Allow the specification of the filesystem UUID at mkfs time. Non-unique unique IDs are rejected. (Implemented only for mkfs.btrfs, not btrfs-convert). Signed-off-by: Eric Sandeen sand...@redhat.com --- V2: reject non-unique unique IDs. diff --git a/btrfs-convert.c b/btrfs-convert.c index

Re: [PATCH V2] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-14 Thread Eric Sandeen
-check is over the top, you had suggested blkid_probe_lookup_value() before, maybe that's simpler. I'm not a blkid expert... but it seems to work. we can now use it for convert as well (to generate or copy the uuid). woo ;) -Eric On Wed, May 14, 2014 at 10:35:05AM -0500, Eric Sandeen

PATCH V3] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-14 Thread Eric Sandeen
, not btrfs-convert). Signed-off-by: Eric Sandeen sand...@redhat.com --- NB: the prior patch didn't work well if you re-mkfs'd with the same UUID; to be honest I didn't get to the bottom of it, but the fact that that old UUID was already in an internal list of present devices seems to have confused

Re: PATCH V3] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-14 Thread Eric Sandeen
On 5/14/14, 5:04 PM, Goffredo Baroncelli wrote: On 05/14/2014 07:39 PM, Eric Sandeen wrote: Allow the specification of the filesystem UUID at mkfs time. Non-unique unique IDs are rejected. This includes attempting to re-mkfs with the same UUID; if you really want to do that, you can mkfs

Re: PATCH V3] mkfs.btrfs: allow UUID specification at mkfs time

2014-05-15 Thread Eric Sandeen
On 5/15/14, 12:39 PM, David Sterba wrote: On Wed, May 14, 2014 at 05:07:04PM -0500, Eric Sandeen wrote: @@ -125,7 +154,20 @@ int make_btrfs(int fd, const char *device, const char *label, memset(super, 0, sizeof(super)); num_bytes = (num_bytes / sectorsize) * sectorsize

Re: [PATCH 1/2] btrfs: label should not contain return char

2014-05-19 Thread Eric Sandeen
On 5/19/14, 12:04 PM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com generally if you use echo test /sys/fs/btrfs/fsid/label it would introduce return char at the end and it can not be part of the label. The correct command is echo -n test /sys/fs/btrfs/fsid/label This

Re: [PATCH 1/2 v2] btrfs: label should not contain return char

2014-05-20 Thread Eric Sandeen
On 5/20/14, 1:36 AM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com generally if you use echo test /sys/fs/btrfs/fsid/label it would introduce return char at the end and it can not be part of the label. The correct command is echo -n test /sys/fs/btrfs/fsid/label This

Re: [PATCH 1/2 v2] btrfs: label should not contain return char

2014-05-20 Thread Eric Sandeen
On 5/20/14, 11:33 AM, David Sterba wrote: On Tue, May 20, 2014 at 02:36:48PM +0800, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com generally if you use echo test /sys/fs/btrfs/fsid/label it would introduce return char at the end and it can not be part of the label. The correct

Re: [PATCH 1/2 v2] btrfs: label should not contain return char

2014-05-21 Thread Eric Sandeen
On 5/21/14, 9:05 PM, Anand Jain wrote: (Random aside: why does btrfs support online fs relabeling, anyway?) -Eric Online you mean when mounted ? Yep - I'm just not sure who would ever want to do that. Aren't labels primarly used for mounting, during the mount process? So changing it

Re: [PATCH 1/4] Btrfs-progs: fsck: only allow partial opening under repair mode

2014-05-28 Thread Eric Sandeen
The subject and the comment say what this change does, but that's obvious from reading the code. Nothing says *why* the change has been made. What does this fix, and how does it fix it? Can you add/update the commit log so that some reader in the future (or for that matter, a reviewer in the

Re: [PATCH 1/4] Btrfs-progs: fsck: only allow partial opening under repair mode

2014-05-28 Thread Eric Sandeen
On 5/28/14, 9:10 AM, Shilong Wang wrote: 2014-05-28 21:56 GMT+08:00 Eric Sandeen sand...@redhat.com: The subject and the comment say what this change does, but that's obvious from reading the code. Nothing says *why* the change has been made. What does this fix, and how does it fix

[PATCH] btrfs-progs: make pretty Documentation/ build match the rest

2014-05-30 Thread Eric Sandeen
-convert.8.gz [LD] btrfs-show-super ASCIIDOC btrfs-debug-tree.xml XMLTO btrfs-debug-tree.8 so I shortened the pretty-text to match what we had before. Also, make clean quiet like it is in the top dir. Signed-off-by: Eric Sandeen sand...@redhat.com --- If folks don't like the 2

Re: [PATCH] mount: add btrfs to mount.8

2014-06-06 Thread Eric Sandeen
On 6/6/14, 5:03 AM, Karel Zak wrote: On Fri, Jun 06, 2014 at 11:44:28AM +0200, Karel Zak wrote: I personally have no problem to maintain information about arbitrary FS in mount.8, the problem are updates. Unfortunately, kernel FS developers don't care about the man page at all and it's very

Re: [PATCH] mount: add btrfs to mount.8

2014-06-09 Thread Eric Sandeen
On 6/7/14, 8:41 AM, Christoph Hellwig wrote: On Fri, Jun 06, 2014 at 10:52:48AM -0500, Eric Sandeen wrote: On 6/6/14, 5:03 AM, Karel Zak wrote: On Fri, Jun 06, 2014 at 11:44:28AM +0200, Karel Zak wrote: I personally have no problem to maintain information about arbitrary FS in mount.8

Re: [PATCH] mount: add btrfs to mount.8

2014-06-11 Thread Eric Sandeen
On 6/7/14, 8:41 AM, Christoph Hellwig wrote: On Fri, Jun 06, 2014 at 10:52:48AM -0500, Eric Sandeen wrote: On 6/6/14, 5:03 AM, Karel Zak wrote: On Fri, Jun 06, 2014 at 11:44:28AM +0200, Karel Zak wrote: I personally have no problem to maintain information about arbitrary FS in mount.8

[PATCH] btrfs-progs: add mount options to btrfs-mount.5

2014-06-11 Thread Eric Sandeen
btrfs asciidoc is generated, there's not a trivial way to have both btrfs(5) and btrfs(8) so I named it btrfs-mount(5) for now. A bit ick and I'm open to suggestions. Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/Documentation/Makefile b/Documentation/Makefile index 03a5cd5

[PATCH V2] btrfs-progs: add mount options to btrfs-mount.5

2014-06-11 Thread Eric Sandeen
btrfs asciidoc is generated, there's not a trivial way to have both btrfs(5) and btrfs(8) so I named it btrfs-mount(5) for now. A bit ick and I'm open to suggestions. Signed-off-by: Eric Sandeen sand...@redhat.com --- V2: whoops, have to $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) too... diff --git

[PATCH] btrfs: free ulist in qgroup_shared_accounting() error path

2014-06-11 Thread Eric Sandeen
If tmp = ulist_alloc(GFP_NOFS) fails, we return without freeing the previously allocated qgroups = ulist_alloc(GFP_NOFS) and cause a memory leak. Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index cf5aead..98cb6b2 100644 --- a/fs/btrfs

[PATCH] btrfs: fix use of uninit ret in end_extent_writepage()

2014-06-11 Thread Eric Sandeen
; but if there is no -writepage_end_io_hook, nothing sets ret. Initializing ret to 0 should be sufficient; if writepage_end_io_hook wasn't set, (!uptodate) means non-zero err was passed in, so we choose -EIO in that case. Signed-of-by: Eric Sandeen sand...@redhat.com --- p.s. - feel free to double

[PATCH] btrfs: fix error handling in create_pending_snapshot

2014-06-11 Thread Eric Sandeen
fcebe456 cut and pasted some code to a later point in create_pending_snapshot(), but didn't switch to the appropriate error handling for this stage of the function. Signed-off-by: Eric Sandeen sand...@redhat.com --- I think this is right. Josef, please double check me :) diff --git a/fs/btrfs

Re: [PATCH V2] btrfs-progs: add mount options to btrfs-mount.5

2014-06-12 Thread Eric Sandeen
On 6/12/14, 5:51 AM, David Sterba wrote: On Wed, Jun 11, 2014 at 05:14:55PM -0500, Eric Sandeen wrote: This is a straight cut and paste from the util-linux mount manpage into btrfs-mount.5 It's pretty much impossible for util-linux to keep up with every filesystem out there, and Karel has

Re: [PATCH 2/2] Remove a leading '+'.

2014-06-13 Thread Eric Sandeen
); } Whoa, git blame blames me, but that's not the patch I sent. ;) Reviewed-by: Eric Sandeen sand...@redhat.com thanks, -Eric -- 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

Re: [PATCH] xfstests: new check 276 to ensure btrfs backref integrity

2011-12-21 Thread Eric Sandeen
On 12/7/11 7:33 AM, Jan Schmidt wrote: This is a btrfs specific scratch test checking the backref walker. It creates a file system with compressed and uncompressed data extents, picks files randomly and uses filefrag to get their extents. It then asks the btrfs utility (inspect-internal) to do

Re: [patch] fix up lock order reversal in writeback

2010-11-16 Thread Eric Sandeen
the allocation. For ext4, at least, it's just best-effort. We're not actually out of space yet when this starts pushing. But it helps us avoid enospc: commit c8afb44682fcef6273e8b8eb19fab13ddd05b386 Author: Eric Sandeen sand...@redhat.com Date: Wed Dec 23 07:58:12 2009 -0500 ext4: flush delalloc

Re: [patch] fix up lock order reversal in writeback

2010-11-16 Thread Eric Sandeen
On 11/16/10 10:38 PM, Nick Piggin wrote: On Tue, Nov 16, 2010 at 10:30:37PM -0600, Eric Sandeen wrote: On 11/16/10 7:01 AM, Jan Kara wrote: On Tue 16-11-10 22:00:58, Nick Piggin wrote: I saw a lock order warning on ext4 trigger. This should solve it. Raciness shouldn't matter much, because

Re: [patch] fix up lock order reversal in writeback

2010-11-17 Thread Eric Sandeen
On 11/17/10 12:10 AM, Nick Piggin wrote: On Tue, Nov 16, 2010 at 11:05:52PM -0600, Eric Sandeen wrote: On 11/16/10 10:38 PM, Nick Piggin wrote: as for the locking problems ... sorry about that! That's no problem. So is that an ack? :) I'd like to test it with the original case

Re: [patch] fix up lock order reversal in writeback

2010-11-18 Thread Eric Sandeen
On 11/18/10 11:10 AM, Andrew Morton wrote: On Thu, 18 Nov 2010 08:55:18 -0600 Eric Sandeen sand...@redhat.com wrote: Can we just delete writeback_inodes_sb_nr_if_idle() and writeback_inodes_sb_if_idle()? The changelog for 17bd55d037a02 is pretty handwavy - do we know that deleting

Re: [patch] fix up lock order reversal in writeback

2010-11-18 Thread Eric Sandeen
On 11/18/10 12:04 PM, Eric Sandeen wrote: On 11/18/10 11:10 AM, Andrew Morton wrote: On Thu, 18 Nov 2010 08:55:18 -0600 Eric Sandeen sand...@redhat.com wrote: Can we just delete writeback_inodes_sb_nr_if_idle() and writeback_inodes_sb_if_idle()? The changelog for 17bd55d037a02 is pretty

Re: [patch] fix up lock order reversal in writeback

2010-11-18 Thread Eric Sandeen
On 11/18/10 12:36 PM, Andrew Morton wrote: On Thu, 18 Nov 2010 12:04:21 -0600 Eric Sandeen sand...@redhat.com wrote: On 11/18/10 11:10 AM, Andrew Morton wrote: On Thu, 18 Nov 2010 08:55:18 -0600 Eric Sandeen sand...@redhat.com wrote: Can we just delete writeback_inodes_sb_nr_if_idle

Re: [PATCH v2] xfstests: new check 278 to ensure btrfs backref integrity

2012-01-04 Thread Eric Sandeen
On 1/4/12 10:39 AM, Christoph Hellwig wrote: On Thu, Dec 22, 2011 at 12:08:58PM +0100, Jan Schmidt wrote: This is a btrfs specific scratch test checking the backref walker. It creates a file system with compressed and uncompressed data extents, picks files randomly and uses filefrag to get

Re: [PATCH V2] btrfs-progs: add mount options to btrfs-mount.5

2014-06-18 Thread Eric Sandeen
On 6/18/14, 10:29 AM, David Sterba wrote: On Thu, Jun 12, 2014 at 09:39:14AM -0500, Eric Sandeen wrote: So what if the mount options are generated from btrfs-mount.txt but installed under btrfs.5.gz name? If there are more section 5 manpages we can make it more generic but for now hardcoding

Re: [PATCH 2/3] btrfs-progs: fix max mirror number error for chunk-recover

2014-06-24 Thread Eric Sandeen
On 6/11/14, 9:25 PM, Gui Hecheng wrote: When run chunk-recover on a health btrfs(data profile raid0, with plenty of data), the program has a chance to abort on the number of mirrors of an extent. According to the kernel code, the max mirror number of an extent is 3 not 2: ctree.h:

Re: [PATCH 2/3] btrfs-progs: fix max mirror number error for chunk-recover

2014-06-24 Thread Eric Sandeen
On 6/24/14, 9:22 PM, Gui Hecheng wrote: On Tue, 2014-06-24 at 21:17 -0500, Eric Sandeen wrote: On 6/11/14, 9:25 PM, Gui Hecheng wrote: When run chunk-recover on a health btrfs(data profile raid0, with plenty of data), the program has a chance to abort on the number of mirrors of an extent

Re: [PATCH 2/3] btrfs-progs: fix max mirror number error for chunk-recover

2014-06-24 Thread Eric Sandeen
On 6/25/14, 12:14 AM, Eric Sandeen wrote: On 6/24/14, 9:22 PM, Gui Hecheng wrote: On Tue, 2014-06-24 at 21:17 -0500, Eric Sandeen wrote: On 6/11/14, 9:25 PM, Gui Hecheng wrote: When run chunk-recover on a health btrfs(data profile raid0, with plenty of data), the program has a chance

[PATCH, RFC] btrfs: refactor open_ctree()

2014-06-25 Thread Eric Sandeen
... } dance where it's not needed. Does this look like a reasonable thing to do? Have I cut things into the right chunks? Would you rather see it as as series of patches, moving one hunk of code at a time? Thanks, -Eric Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/fs/btrfs

[PATCH] btrfs-progs: add supported attr flags to btrfs(5)

2014-06-26 Thread Eric Sandeen
the attributes supported by btrfs. Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/Documentation/btrfs-mount.txt b/Documentation/btrfs-mount.txt index 4433a78..c38e80a 100644 --- a/Documentation/btrfs-mount.txt +++ b/Documentation/btrfs-mount.txt @@ -3,7 +3,7 @@ btrfs-mount(5) NAME

Re: [PATCH] btrfs-progs: add supported attr flags to btrfs(5)

2014-06-27 Thread Eric Sandeen
On 6/27/14, 8:42 AM, David Sterba wrote: On Thu, Jun 26, 2014 at 03:38:33PM -0500, Eric Sandeen wrote: +FILE ATTRIBUTES +--- +The btrfs filesystem supports setting the following file +attributes the `chattr`(1) utility +append only (a), no atime updates (A), compressed (c

Re: [PATCH] btrfs-progs: add supported attr flags to btrfs(5)

2014-06-27 Thread Eric Sandeen
On 6/27/14, 10:30 AM, David Sterba wrote: On Fri, Jun 27, 2014 at 09:56:10AM -0500, Eric Sandeen wrote: * and 'X' does not mean no compression and never has, although I'd like to see a chattr bit for that because we have the corresponding inode bit Ok, then I'm not sure what it does mean

Re: [PATCH] btrfs-progs: add supported attr flags to btrfs(5)

2014-06-27 Thread Eric Sandeen
On 6/27/14, 11:10 AM, David Sterba wrote: On Fri, Jun 27, 2014 at 10:36:54AM -0500, Eric Sandeen wrote: ... btrfs tries to handle a flag value which is identical to the 'X' flag value, which lsattr/chattr says is readonly... I'm looking at it from the kernel side, ie what's its meaning

[PATCH] btrfs: fix nossd and ssd_spread mount option regression

2014-06-27 Thread Eric Sandeen
nossd,ssd_spread works?) Reported-by: Roman Mamedov r...@romanrm.net Signed-off-by: Eric Sandeen sand...@redhat.com --- I've tested this insofar as I was actually able to mount with nossd,and see it reflected in /proc/mounts. If SSD_SPREAD is set, show_options() won't show you the ssd option, so

Re: [PATCH v2] btrfs: fix nossd and ssd_spread mount option regression

2014-07-02 Thread Eric Sandeen
On 7/1/14, 11:19 PM, Qu Wenruo wrote: From: Eric Sandeen sand...@redhat.com The commit 0780253 btrfs: Cleanup the btrfs_parse_options for remount. broke ssd options quite badly; it stopped making ssd_spread imply ssd, and it made nossd unsettable. Put things back at least as well

Re: [PATCH 2/2] btrfs-progs: Add mount point check for 'btrfs fi df' command

2014-07-07 Thread Eric Sandeen
On 7/4/14, 8:52 AM, David Sterba wrote: On Fri, Jul 04, 2014 at 04:38:49PM +0800, Qu Wenruo wrote: 'btrfs fi df' command is currently able to be executed on any file/dir inside btrfs since it uses btrfs ioctl to get disk usage info. However it is somewhat confusing for some end users since

[PATCH] btrfs: test for valid bdev before kobj removal in btrfs_rm_device

2014-07-07 Thread Eric Sandeen
need to move the kobject removal to be under that test. (Coverity spotted this) Signed-off-by: Eric Sandeen sand...@redhat.com --- If it's not possible for bdev to be null, then the test should just be removed, but that's above my current btrfs pay grade. ;) diff --git a/fs/btrfs/volumes.c b/fs

Re: [PATCH] btrfs: remove unnecessary error check

2014-07-09 Thread Eric Sandeen
On Jul 9, 2014, at 10:20 PM, Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com If (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC)) is false, obviously trans is -ENOSPC. So we can safely remove the redundant (PTR_ERR(trans) ==

Re: [PATCH v3] btrfs: remove unnecessary error check

2014-07-11 Thread Eric Sandeen
. Signed-off-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Reviewed-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/inode.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3668048..e7ac779

Re: BUGS: bogus out of space reported when mounted raid1 degraded, btrfs replace failure, then oops

2014-07-22 Thread Eric Sandeen
Author: Eric Sandeen sand...@redhat.com Date: Mon Jul 7 12:34:49 2014 -0500 btrfs: test for valid bdev before kobj removal in btrfs_rm_device -Eric On 7/22/14, 8:34 PM, Chris Murphy wrote: BUG 4: When mounting -degraded (rw), I get a major oops resulting in a completely unresponsive system

Re: BUGS: bogus out of space reported when mounted raid1 degraded, btrfs replace failure, then oops

2014-07-22 Thread Eric Sandeen
On 7/22/14, 10:36 PM, Liu Bo wrote: On Tue, Jul 22, 2014 at 09:28:52PM -0600, Chris Murphy wrote: On Jul 22, 2014, at 8:52 PM, Eric Sandeen sand...@redhat.com wrote: This one (your bug #4) was likely caused by: commit 4cde9c59c2b8bb67d46d531b26cc73e39747 Author: Anand Jain anand.j

Re: [PATCH, RFC] btrfs: refactor open_ctree()

2014-07-24 Thread Eric Sandeen
On 7/24/14, 4:25 PM, Chris Mason wrote: On 06/25/2014 07:55 PM, Eric Sandeen wrote: First off: total RFC, don't merge this; it builds, but is totally untested. open_ctree() is almost 1000 lines long. I've started trying to refactor it, primarily into helper functions, and also simplifying

[PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-24 Thread Eric Sandeen
to be sectorsize multiples in order for all mkfs'd device sizes to match. Signed-off-by: Eric Sandeen sand...@redhat.com --- ideally this might go into btrfs_device_size(), but we don't have the chosen sector size anywhere near there... diff --git a/utils.c b/utils.c index e130849..4d7ee35 100644

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Eric Sandeen
On 7/25/14, 12:12 PM, Zach Brown wrote: On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: ^^^ -device-total_bytes = block_count; +device-total_bytes = (block_count

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Eric Sandeen
On 7/25/14, 12:25 PM, Eric Sandeen wrote: On 7/25/14, 12:12 PM, Zach Brown wrote: On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: ^^^ - device-total_bytes = block_count

Re: Help with Project on brtfs wiki

2014-07-26 Thread Eric Sandeen
On 7/26/14, 8:43 PM, Nick Krause wrote: ... Fine then I guess I need to read the documentation and other things on my own. Seems everyone here wants me to figure out everything on my own. Hugo bent over backwards, twice, to give you very good advice. So did Steven Rostedt on LKML. You

[PATCH 09/12] btrfs: factor btrfs_setup_super() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Move all the superblock flag geometry testing fiddling into its own function. This does coalesce some far-flung tests, but it ... looks ok to me. Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 207 1 files changed

[PATCH 10/12] btrfs: factor btrfs_alloc_workqueues() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 144 1 files changed, 77 insertions(+), 67 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 31e9791..0465d43 100644 --- a/fs/btrfs/disk-io.c +++ b

[PATCH 12/12] btrfs: factor btrfs_replay_log() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 100 +--- 1 files changed, 56 insertions(+), 44 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index a50beca..ffb2f21 100644 --- a/fs/btrfs/disk-io.c +++ b

[PATCH 04/12] btrfs: factor btrfs_scrub_init() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 28d35a8..b95635f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2134,6

[PATCH 02/12] btrfs: consistently use fs_info in close_ctree()

2014-08-01 Thread Eric Sandeen
close_ctree() has a local fs_info var for convienience; use it consistently. Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f6d7afd..e6746be 100644

[PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-01 Thread Eric Sandeen
Reading the quota tree root may fail with ENOENT if there is no quota, which is fine, but the code was ignoring every other error as well, which is not fine. Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions

[PATCH 01/12] btrfs: remove unused fs_info arg from btrfs_close_extra_devices()

2014-08-01 Thread Eric Sandeen
The commit: 8dabb74 Btrfs: change core code of btrfs to support the device replace operations added the fs_info argument, but never used it - just remove it again. Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c |4 ++-- fs/btrfs/volumes.c |3 +-- fs/btrfs

[PATCH 05/12] btrfs: factor btrfs_balance_init() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index b95635f..8c7113b 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2145,6

[PATCH 08/12] btrfs: factor btrfs_qgroup_init() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 26 +++--- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index a5fa84f..47fcacf 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c

[PATCH 07/12] btrfs: factor btrfs_dev_replace_locks_init() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 6636386..a5fa84f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2186,6

[PATCH 00/12] disk-io.c / open_ctree cleanup refactoring

2014-08-01 Thread Eric Sandeen
This is mostly to refactor open_ctree(); at the end of the series it's only around 600 lines instead of 900. The first 2 patches are just little cleanups I saw while doing this; the 3rd actually is something of a bugfix. The rest are refactoring - this is a bit of an RFC still; some seem like

[PATCH 06/12] btrfs: factor btrfs_btree_inode_init() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 56 --- 1 files changed, 31 insertions(+), 25 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 8c7113b..6636386 100644 --- a/fs/btrfs/disk-io.c +++ b

[PATCH 11/12] btrfs: factor btrfs_read_roots() out of open_ctree()

2014-08-01 Thread Eric Sandeen
Also, remove the two local variables create_uuid_tree and check_uuid_tree; we can use the existence of the uuid root and/or the RESCAN_UUID_TREE flag to determine what action to take. Signed-off-by: Eric Sandeen sand...@redhat.com --- fs/btrfs/disk-io.c | 141

Re: [PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-04 Thread Eric Sandeen
On 8/4/14, 1:35 PM, Zach Brown wrote: On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote: Reading the quota tree root may fail with ENOENT if there is no quota, which is fine, but the code was ignoring every other error as well, which is not fine. Kinda makes you want to write

Re: [PATCH 03/12] btrfs: handle errors from reading the quota tree root

2014-08-04 Thread Eric Sandeen
On 8/4/14, 1:51 PM, Zach Brown wrote: On Mon, Aug 04, 2014 at 01:42:23PM -0500, Eric Sandeen wrote: On 8/4/14, 1:35 PM, Zach Brown wrote: On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote: Reading the quota tree root may fail with ENOENT if there is no quota, which is fine

Re: [PATCH] btrfs: Drop stray check of fixup_workers creation

2014-08-09 Thread Eric Sandeen
-by: Maks Naumov maksq...@ukr.net Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com Yup, harmless but unneeded. However, might as well put the extent_workers qgroup_rescan_workers checks on the same line now... Could probably do a V2 or fix it on commit, but anyway: Reviewed-by: Eric

Re: [PATCH 1/3] btrfs-progs: random fixes of btrfs-filesystem documentation

2014-08-11 Thread Eric Sandeen
On 8/11/14, 2:11 AM, Satoru Takeuchi wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com - Simplify and unify the description of both man and usage. - Fix to show -m and -d is not exclusive with path|uuid|device|label. - Add the description about short options for --mounted

Re: [PATCH 1/3] btrfs-progs: random fixes of btrfs-filesystem documentation

2014-08-11 Thread Eric Sandeen
On 8/11/14, 10:05 AM, Eric Sandeen wrote: On 8/11/14, 2:11 AM, Satoru Takeuchi wrote: From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com - Simplify and unify the description of both man and usage. - Fix to show -m and -d is not exclusive with path|uuid|device|label. - Add

Re: [PATCH 1/3] btrfs-progs: random fixes of btrfs-filesystem documentation

2014-08-11 Thread Eric Sandeen
On Aug 11, 2014, at 4:51 PM, Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com wrote: Hi Eric, ... OK, I'll fix my patch based on your comment. # Of course, I'll replace (btrfs?) with something proper words. I assumed it only scans btrfs but didn't know for sure :) Can I add your

[PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-17 Thread Eric Sandeen
allocations before we return. roots is initialized to NULL, so it should be safe to free it unconditionally (ulist_free() handles that case). Cc: Mark Fasheh mfas...@suse.de Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index b497498..8abe455

Re: [PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-17 Thread Eric Sandeen
On 8/17/14, 3:09 PM, Eric Sandeen wrote: Coverity pointed this out; in the newly added qgroup_subtree_accounting(), if btrfs_find_all_roots() returns an error, we leak at least the parents pointer, and possibly the roots pointer, depending on what failure occurs. FWIW, Coverity also doesn't

Re: [PATCH 1/3] btrfs-progs: random fixes of btrfs-filesystem documentation

2014-08-19 Thread Eric Sandeen
On 8/19/14, 10:10 AM, David Sterba wrote: On Mon, Aug 11, 2014 at 10:05:52AM -0700, Eric Sandeen wrote: (What seems to be missing, though, is why would the user ever choose to use '-d?') That's a fallback method if blkid or udev are not available. We've had reports in the past

Re: [PATCH] Btrfs: fix crash on endio of reading corrupted block

2014-08-19 Thread Eric Sandeen
On 8/19/14, 10:33 AM, Liu Bo wrote: The crash is [ cut here ] kernel BUG at fs/btrfs/extent_io.c:2124! [...] Workqueue: btrfs-endio normal_work_helper [btrfs] RIP: 0010:[a02d6055] [a02d6055] end_bio_extent_readpage+0xb45/0xcd0 [btrfs] This is

[PATCH 0/3] btrfs-progs: remove full /dev scanning

2014-08-20 Thread Eric Sandeen
btrfs fileystem show and btrfs device scan today both have the -d option to scan everything under /dev. But we also have a mechanism to scan everything in /proc/partitions, which should always be sufficient. If anyone knows why we'd find something deep under /dev but not in /proc/partitions,

[PATCH 1/3] btrfs-progs: scan /proc/partitions not all of /dev with -d

2014-08-20 Thread Eric Sandeen
/partitions has every device known to the kernel, so just use that when -d is specified. Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/cmds-device.c b/cmds-device.c index b6772b9..519681a 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -224,7 +224,7 @@ static int cmd_scan_dev(int

<    1   2   3   4   5   6   >