[PATCH] btrfs: fall back to global reservation when removing subvolumes

2013-07-09 Thread Jeff Mahoney
back onto the global block reservation in order to succeed when it would have failed otherwise. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |2 +- fs/btrfs/extent-tree.c |8 +++- fs/btrfs/ioctl.c |7 --- 3 files changed, 12 insertions(+), 5

Re: Unable to unmount filesystem (bug in kernel reported in kern.log)

2013-08-04 Thread Jeff Mahoney
]--- -- 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 -- Jeff Mahoney SUSE Labs signature.asc Description: OpenPGP digital signature

[PATCH] btrfs-progs: restore passing of super_bytenr to device scan

2013-08-15 Thread Jeff Mahoney
the newly initialized file system, it fails with: No valid btrfs found since its superblock wasn't written to the normal location. This patch restores the passing down of super_bytesnr to btrfs_scan_one_device. Signed-off-by: Jeff Mahoney je...@suse.com --- btrfs-find-root.c | 2 +- cmds-chunk.c

[PATCH 2/2] utils: add support for getting/changing file system, features

2013-08-27 Thread Jeff Mahoney
with a -f option. It supports clearing of feature bits, but I've left that undocumented intentionally. Signed-off-by: Jeff Mahoney je...@suse.com --- cmds-filesystem.c | 42 + ioctl.h | 12 ++ man/btrfs.8.in| 28 utils.c | 478

[PATCH] btrfs: add ability to query/change feature bits online

2013-08-27 Thread Jeff Mahoney
by a GET_SUPPORTED_FEATURES call. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |6 ++ fs/btrfs/ioctl.c | 127 + include/uapi/linux/btrfs.h | 12 3 files changed, 145 insertions(+) --- a/fs/btrfs/ctree.h 2013-08

[PATCH 1/2] ctree: fix broken macros for compat_ro

2013-08-27 Thread Jeff Mahoney
The macro for compat_ro had the right name but was modifying compat instead. Signed-off-by: Jeff Mahoney je...@suse.com --- ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctree.h b/ctree.h index 0b0d701..8ef45f3 100644 --- a/ctree.h +++ b/ctree.h @@ -1912,7 +1912,7

Re: [PATCH] Btrfs: add support for asserts

2013-08-27 Thread Jeff Mahoney
-at-a-glance easy is worth it. -Jeff -- Jeff Mahoney SUSE Labs signature.asc Description: OpenPGP digital signature

Re: [PATCH] Btrfs: add support for asserts

2013-08-27 Thread Jeff Mahoney
btrfs_fs_info *fs_info, const char *function, unsigned int line, int errno, const char *fmt, ...); -- Jeff Mahoney SUSE Labs signature.asc Description: OpenPGP digital signature

Re: [PATCH] Btrfs: add support for asserts

2013-08-27 Thread Jeff Mahoney
On 8/27/13 4:56 PM, Josef Bacik wrote: On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote: On 8/26/13 4:56 PM, Josef Bacik wrote: One of the complaints we get a lot is how many BUG_ON()'s we have. So to help with this I'm introducing a kconfig option to enable/disable a new ASSERT

Re: [PATCH] Btrfs: add support for asserts

2013-08-27 Thread Jeff Mahoney
On 8/27/13 5:21 PM, Eric Sandeen wrote: On 8/27/13 4:07 PM, Jeff Mahoney wrote: On 8/27/13 4:56 PM, Josef Bacik wrote: On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote: On 8/26/13 4:56 PM, Josef Bacik wrote: One of the complaints we get a lot is how many BUG_ON()'s we have. So

Re: [PATCH] Btrfs: add support for asserts

2013-08-27 Thread Jeff Mahoney
On 8/27/13 5:28 PM, Eric Sandeen wrote: On 8/27/13 4:25 PM, Jeff Mahoney wrote: On 8/27/13 5:21 PM, Eric Sandeen wrote: On 8/27/13 4:07 PM, Jeff Mahoney wrote: On 8/27/13 4:56 PM, Josef Bacik wrote: On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote: On 8/26/13 4:56 PM, Josef Bacik

[PATCH] xfstests: fix device lookup in btrfs/003

2013-09-03 Thread Jeff Mahoney
by dev instead of by name, we can handle working with full disks and partitions more easily and get the ability to use any device name rather than just the ones that match sysfs. Signed-off-by: Jeff Mahoney je...@suse.com --- tests/btrfs/003 | 18 +++--- 1 file changed, 15 insertions

Re: [PATCH] btrfs: add ability to query/change feature bits online

2013-09-03 Thread Jeff Mahoney
On 9/3/13 5:25 AM, Stefan Behrens wrote: On Tue, 27 Aug 2013 15:17:54 -0400, Jeff Mahoney wrote: There are some feature bits that require no offline setup and can be enabled online. I've only reviewed extended irefs, but there will probably be more. We introduce three new ioctls

Re: [PATCH] xfstests: fix device lookup in btrfs/003

2013-09-06 Thread Jeff Mahoney
On 9/6/13 10:03 AM, David Sterba wrote: On Tue, Sep 03, 2013 at 06:19:01PM -0400, Jeff Mahoney wrote: The DEVHTL lookup in btrfs/003 is broken. It can only handle full LUNs and not partitions on a disk. Rather than returning 2:0:0:0 for /dev/sdc7, it returns 'block' and we see: ./common/rc

[patch 0/7] btrfs: Add ability to query/modify feature bits while mounted

2013-09-09 Thread Jeff Mahoney
The first patch of this series is the ioctl patch I posted before, with the review comments handled. The rest of the series is enabling sysfs access to feature bits, similar to how ext4 publishes that information. Since we already have the online changing ability via the ioctl patch, we can also

[patch 5/7] btrfs: Add publishing of unknown features in sysfs

2013-09-09 Thread Jeff Mahoney
number rather than the shifted value. e.g. compat:12 Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/sysfs.c | 76 --- 1 file changed, 72 insertions(+), 4 deletions(-) --- a/fs/btrfs/sysfs.c 2013-09-10 00:10:02.549453084 -0400 +++ b/fs

[patch 4/7] btrfs: publish per-super features to sysfs

2013-09-09 Thread Jeff Mahoney
This patch publishes information on which features are enabled in the file system on a per-super basis. At this point, it only publishes information on features supported by the file system implementation. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |6 +++ fs/btrfs

[patch 1/7] [PATCH] btrfs: add ability to query/change feature bits online

2013-09-09 Thread Jeff Mahoney
to change at runtime. The failure modes for BTRFS_IOC_SET_FEATURES are as follows: - Enabling a completely unsupported feature: warns and returns -ENOTSUPP - Enabling a feature that can only be done offline: warns and returns -EPERM Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h

[patch 2/7] btrfs: export supported featured to sysfs

2013-09-09 Thread Jeff Mahoney
This patch adds the ability to publish supported features to sysfs under /sys/fs/btrfs/features. The files are module-wide and export which features the kernel supports. The content, for now, is just 0\n. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/sysfs.c | 94

[patch 6/7] btrfs: Add ability to change features via sysfs

2013-09-09 Thread Jeff Mahoney
0644 permissions and the store handler will filter out the write based on the bitmask. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/sysfs.c | 105 ++- 1 file changed, 104 insertions(+), 1 deletion(-) --- a/fs/btrfs/sysfs.c 2013-09

[patch 3/7] btrfs: Add per-super attributes to sysfs

2013-09-09 Thread Jeff Mahoney
This patch adds per-super attributes to sysfs. It doesn't publish any attributes yet, but does the proper lifetime handling as well as the basic infrastructure to add new attributes. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |2 + fs/btrfs/super.c | 13

[patch 7/7] btrfs: use feature attribute names to print better error messages

2013-09-09 Thread Jeff Mahoney
Now that we have the feature name strings available in the kernel via the sysfs attributes, we can use them for printing better failure messages from the ioctl path. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ioctl.c | 35 ++- fs/btrfs/sysfs.c

[PATCH 1/2] ctree: fix broken macros for compat_ro

2013-09-09 Thread Jeff Mahoney
The macro for compat_ro had the right name but was modifying compat instead. Signed-off-by: Jeff Mahoney je...@suse.com --- ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctree.h b/ctree.h index 0b0d701..8ef45f3 100644 --- a/ctree.h +++ b/ctree.h @@ -1912,7 +1912,7

[PATCH 2/2 v2] utils: add support for getting/changing file system, features

2013-09-09 Thread Jeff Mahoney
newer ioctl patchset; Cleanup Signed-off-by: Jeff Mahoney je...@suse.com --- cmds-filesystem.c | 43 ioctl.h | 12 ++ man/btrfs.8.in| 28 +++ utils.c | 588 ++ utils.h | 9 + 5 files changed, 680

[PATCH 1/2] ctree: fix broken macros for compat_ro

2013-09-09 Thread Jeff Mahoney
The macro for compat_ro had the right name but was modifying compat instead. Signed-off-by: Jeff Mahoney je...@suse.com --- ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctree.h b/ctree.h index 0b0d701..8ef45f3 100644 --- a/ctree.h +++ b/ctree.h @@ -1912,7 +1912,7

[PATCH 2/2 v2] utils: add support for getting/changing file system, features

2013-09-09 Thread Jeff Mahoney
newer ioctl patchset; Cleanup Signed-off-by: Jeff Mahoney je...@suse.com --- cmds-filesystem.c | 43 ioctl.h | 12 ++ man/btrfs.8.in| 28 +++ utils.c | 588 ++ utils.h | 9 + 5 files changed, 680

Re: [PATCH][RESEND] vfs: allow /proc/PID/maps to get device from stat

2013-09-10 Thread Jeff Mahoney
. -Jeff -- Jeff Mahoney SUSE Labs signature.asc Description: OpenPGP digital signature

Re: [patch 1/7] [PATCH] btrfs: add ability to query/change feature bits online

2013-09-16 Thread Jeff Mahoney
On 9/16/13 1:26 PM, David Sterba wrote: On Tue, Sep 10, 2013 at 12:24:09AM -0400, Jeff Mahoney wrote: +static int btrfs_ioctl_set_features(struct file *file, void __user *arg) +{ +struct btrfs_root *root = BTRFS_I(file_inode(file))-root; +struct btrfs_super_block *super_block = root

[patch 0/9 v3] add ability to query/change feature bits online

2013-09-16 Thread Jeff Mahoney
The first patch of this series is the ioctl patch I posted before, with the review comments handled. It now uses the reserved 57 ioctl. The rest of the series is enabling sysfs access to feature bits, similar to how ext4 publishes that information. Since we already have the online changing

[patch 9/9] btrfs: use feature attribute names to print better error messages

2013-09-16 Thread Jeff Mahoney
Now that we have the feature name strings available in the kernel via the sysfs attributes, we can use them for printing better failure messages from the ioctl path. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ioctl.c | 35 ++- fs/btrfs/sysfs.c

[patch 8/9] btrfs: add ability to change features via sysfs

2013-09-16 Thread Jeff Mahoney
0644 permissions and the store handler will filter out the write based on the bitmask. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/sysfs.c | 97 ++- 1 file changed, 96 insertions(+), 1 deletion(-) --- a/fs/btrfs/sysfs.c 2013-09-16

[patch 4/9] btrfs: export supported featured to sysfs

2013-09-16 Thread Jeff Mahoney
This patch adds the ability to publish supported features to sysfs under /sys/fs/btrfs/features. The files are module-wide and export which features the kernel supports. The content, for now, is just 0\n. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |4 ++-- fs/btrfs

[patch 2/9] btrfs: use btrfs_commit_transaction when setting fslabel

2013-09-16 Thread Jeff Mahoney
The set_fslabel ioctl uses btrfs_end_transaction, which means it's possible that the change will be lost if the system crashes. Let's use btrfs_commit_transaction instead. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ioctl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[patch 5/9] btrfs: add per-super attributes to sysfs

2013-09-16 Thread Jeff Mahoney
This patch adds per-super attributes to sysfs. It doesn't publish any attributes yet, but does the proper lifetime handling as well as the basic infrastructure to add new attributes. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |2 + fs/btrfs/super.c | 13

[patch 1/9] btrfs: add ioctls to query/change feature bits online

2013-09-16 Thread Jeff Mahoney
to change at runtime. The failure modes for BTRFS_IOC_SET_FEATURES are as follows: - Enabling a completely unsupported feature: warns and returns -ENOTSUPP - Enabling a feature that can only be done offline: warns and returns -EPERM Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h

[patch 3/9] kobject: introduce kobj_completion

2013-09-16 Thread Jeff Mahoney
, and put-and-wait. Signed-off-by: Jeff Mahoney je...@suse.com --- include/linux/kobj_completion.h | 18 ++ lib/kobject.c | 50 2 files changed, 68 insertions(+) --- /dev/null 1970-01-01 00:00:00.0 + +++ b

[patch 7/9] btrfs: add publishing of unknown features in sysfs

2013-09-16 Thread Jeff Mahoney
number rather than the shifted value. e.g. compat:12 Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/sysfs.c | 75 --- 1 file changed, 71 insertions(+), 4 deletions(-) --- a/fs/btrfs/sysfs.c 2013-09-10 15:58:32.209384497 -0400 +++ b/fs

[patch 6/9] btrfs: publish per-super features to sysfs

2013-09-16 Thread Jeff Mahoney
This patch publishes information on which features are enabled in the file system on a per-super basis. At this point, it only publishes information on features supported by the file system implementation. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |1 fs/btrfs/sysfs.c

Re: [patch 1/9] btrfs: add ioctls to query/change feature bits online

2013-09-18 Thread Jeff Mahoney
On 9/18/13 10:14 AM, David Sterba wrote: On Mon, Sep 16, 2013 at 02:19:11PM -0400, Jeff Mahoney wrote: There are some feature bits that require no offline setup and can be enabled online. I've only reviewed extended irefs, but there will probably be more. Each feature bit being set online

Re: Btrfs v0.14 Released

2008-05-01 Thread Jeff Mahoney
when they are not enabled in the config. Yeah, unless Ubuntu is doing some magic with the function arguments (which sounds like the fix is worse than the problem), this is true. - -Jeff - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using

Re: Btrfs v0.14 Released

2008-05-02 Thread Jeff Mahoney
around it in the btrfs source. - -Jeff - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkgbQJoACgkQLPWxlyuTD7KhZACfZeZMBNx6x/avk5a2AED1g4rV deEAnjgTp18gxVn4d7USmdfSXOeweG52 =/yZN

[PATCH] New fs-specific Kconfig options should go in fs/$FS/Kconfig, not fs/Kconfig.

2009-02-03 Thread Jeff Mahoney
Commit 699b6faa2ab283219914501d5117f8a93c7e441b allowed btrfs ACLs to be selectable, but put the option in the main fs/Kconfig, and didn't make it depend on btrfs. This patch moves the option and adds the dependency. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/Kconfig | 13

[PATCH] btrfs: fix btrfs_read_block_groups return value

2009-02-11 Thread Jeff Mahoney
if the kzalloc fails. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6106,7 +6106,7 @@ int btrfs_free_block_groups(struct btrfs int

PATCH] btrfs: Check transaction start

2009-02-11 Thread Jeff Mahoney
is more involved, we BUG. This isn't a change in functionality since we'd Oops anyway. The more complex recovery should be done in separate patches, so this is really just to annotate where that needs to happen. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/disk-io.c |4

[PATCH] btrfs: remove btrfs_init_path

2009-02-11 Thread Jeff Mahoney
Since btrfs_alloc_path is universally used, there's no point in keeping btrfs_init_path around. This patch removes it, and just uses the __GFP_ZERO flag for kmem_cache_alloc to zero out the object. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c | 12 ++-- fs

Re: [PATCH] btrfs: fix btrfs_read_block_groups return value

2009-02-12 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Mason wrote: On Wed, 2009-02-11 at 20:51 -0500, Jeff Mahoney wrote: btrfs_read_block_groups returns an ambiguous value. Whether it finds a block group or not, it will return -ENOENT. find_first_block_group will eventually return -ENOENT

[PATCH 1/5] Btrfs: fix btrfs_read_block_groups return value

2009-02-13 Thread Jeff Mahoney
are reported as expected. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0a5d796..777af73 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs

[PATCH 4/5] Btrfs: fix up btrfs_start_workers error handling

2009-02-13 Thread Jeff Mahoney
they were never added to the worker or idle lists, this should be quick as well. It also handles startup failures during mount. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/async-thread.c | 17 - fs/btrfs/disk-io.c | 40 2

[PATCH 2/5] Btrfs: handle transaction start failures

2009-02-13 Thread Jeff Mahoney
is more involved, we BUG. This isn't a change in functionality since we'd Oops anyway. The more complex recovery should be done in separate patches, so this is really just to annotate where that needs to happen. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/disk-io.c |4

[PATCH 3/5] Btrfs: handle path alloc failures

2009-02-13 Thread Jeff Mahoney
This patch checks the returns from btrfs_path_alloc, and acts accordingly. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/acl.c |3 ++ fs/btrfs/compression.c | 11 -- fs/btrfs/ctree.c | 13 ++-- fs/btrfs/dir-item.c|4 ++ fs/btrfs/disk-io.c

Re: [PATCH 1/5] Btrfs: fix btrfs_read_block_groups return value

2009-02-13 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 BTW Chris, these 5 patches are currently queued up on my git tree: git://jeffreymahoney.com/linux/btrfs-unstable for-mason - -Jeff Jeff Mahoney wrote: btrfs_read_block_groups returns an ambiguous value. Whether it finds a block group

Re: [PATCH] Btrfs-progs: update btrfs-debug-tree

2009-02-19 Thread Jeff Mahoney
(struct btrfs_disk_key *disk_key); #endif - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkmd+6sACgkQLPWxlyuTD7LpXgCfcY96xUz7bFeJiXWZaMW8pUAx F9gAnR9qwIw/rlrDkGkHKRow93dlfdn/ =/1uI

Re: [PATCH] Btrfs-progs: update btrfs-debug-tree

2009-02-20 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Mason wrote: On Thu, 2009-02-19 at 19:39 -0500, Jeff Mahoney wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shen Feng wrote: output objectid in btrfs_disk_key with human readable strings. Other updates are included for more readable

[PATCH] Extensible printk format strings

2009-02-20 Thread Jeff Mahoney
the case. No additional code changes are required - this is for extensions only. Signed-off-by: Jeff Mahoney je...@suse.com --- include/linux/kernel.h | 36 include/linux/printf.h | 11 + kernel/printk.c| 25 ++- lib/kasprintf.c| 28

[PATCH 1/3] Extensible printk (and friends)

2009-02-20 Thread Jeff Mahoney
-implement most of pointer() as an epointer() client, as well as convert reiserfs's prepare_error_buf to this interface. No additional code changes are required - this is for extensions only. Signed-off-by: Jeff Mahoney je...@suse.com --- include/linux/kernel.h | 36 + include

[PATCH 2/3] printk: Convert existing pointer() extensions to operations

2009-02-20 Thread Jeff Mahoney
This patch converts the existing pointer extensions from a switch statement to an array of printf_operations. The result is a very small pointer(), which only tests for null, tries to expand typed pointers, and eventually falls back to numeric printing. Signed-off-by: Jeff Mahoney je

Re: PATCH] btrfs: Check transaction start

2009-03-30 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andi Kleen wrote: Jeff Mahoney je...@suse.com writes: wake_up_process(root-fs_info-cleaner_kthread); @@ -2197,10 +2199,12 @@ int btrfs_commit_super(struct btrfs_root btrfs_clean_old_snapshots(root); mutex_unlock(root

Re: Proper error handling on NULL pointers

2009-10-23 Thread Jeff Mahoney
of work. When's the last time you saw a lull in btrfs development? :) I'll refresh it when I get a chance either today or early next week and post it again. -Jeff -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

Re: Proper error handling on NULL pointers

2009-10-30 Thread Jeff Mahoney
On 10/26/2009 05:14 AM, Chris Mason wrote: On Fri, Oct 23, 2009 at 02:08:48PM -0400, Jeff Mahoney wrote: On 10/22/2009 06:15 AM, Andi Drebes wrote: I don't know what is the developer plan to fix that - apparently it's not in the high-priority list (but it must be certainly in the priority

[patch 04/10] btrfs: btrfs_sync_file should return -EIO not EIO

2009-11-04 Thread Jeff Mahoney
This patch fixes a typo in the return path of btrfs_sync_file, which currently returns EIO instead of -EIO. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/file.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1223,7 +1223,7

[patch 02/10] btrfs: fix memleak in btrfs_init_new_device

2009-11-04 Thread Jeff Mahoney
If find_next_devid fails, btrfs_init_new_device frees device but not device-name. This patch fixes it. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c |1 + 1 file changed, 1 insertion(+) --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1474,6 +1474,7 @@ int

[patch 08/10] btrfs: annotate btrfs_{start,join}_transaction failures

2009-11-04 Thread Jeff Mahoney
This patch locates and adds checks for failed transaction joins and starts. It doesn't do anything other than use BTRFS_UERROR to annotate them to keep the patch simple and obvious. The next patch will add handling up the call chain where it's obvious. Signed-off-by: Jeff Mahoney je...@suse.com

[patch 05/10] btrfs: Add BTRFS_UERROR for unhandled errors

2009-11-04 Thread Jeff Mahoney
the failure occured and what the failure condition was. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |8 fs/btrfs/super.c |8 2 files changed, 16 insertions(+) --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1951,6 +1951,13 @@ static inline struct

[patch 07/10] btrfs: handle kmalloc call path failures

2009-11-04 Thread Jeff Mahoney
This patch adds checks to ensure that kmalloc or kmem_cache_alloc has succeeded before using the memory. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c |3 ++- fs/btrfs/disk-io.c |5 - fs/btrfs/extent-tree.c | 28 +++- fs/btrfs

[patch 03/10] btrfs: fix btrfs_read_fs_root* return values

2009-11-04 Thread Jeff Mahoney
The btrfs_read_fs_root* functions return ERR_PTR values but the return is being checked for NULL instead. This patch fixes up the checks to use IS_ERR. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/disk-io.c |4 +++- fs/btrfs/extent-tree.c |6 +++--- fs/btrfs/tree-log.c

[patch 00/10] btrfs: Error handling/propagation queue

2009-11-04 Thread Jeff Mahoney
fixes coming. In particular, it currently only annotates btrfs_alloc_path failures as the call graph for it is quite large. This is in response to Chris asking for what I already have instead of waiting for it to be complete. -Jeff -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list

[patch 06/10] btrfs: annotate kmalloc failures

2009-11-04 Thread Jeff Mahoney
This patch adds checks to ensure that kmalloc or kmem_cache_alloc has succeeded before using the memory. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c |2 ++ fs/btrfs/ctree.c |1 + fs/btrfs/disk-io.c |1 + fs/btrfs/extent-tree.c | 12

[patch 09/10] btrfs: handle btrfs_{start,join}_transaction call path failures

2009-11-04 Thread Jeff Mahoney
the call path. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c | 10 ++- fs/btrfs/disk-io.c | 37 +- fs/btrfs/extent-tree.c | 43 ++-- fs/btrfs/extent_io.c | 60 ++ fs/btrfs/file.c| 16 -- fs/btrfs

[PATCH] btrfs: extend BTRFS_IOC_SNAP_CREATE_V2 to snapshot by subvolid

2014-03-24 Thread Jeff Mahoney
the ioctl to use the fd argument (which is now a union) as a subvolume id instead. The subvolume ID is used to look up the root and instantiate the inode so proper permission checking takes place. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ioctl.c | 77

[PATCH] btrfs-progs: allow use of subvolume id to create snapshots

2014-03-24 Thread Jeff Mahoney
\fIqgroupid\fR 5 +Add the newly created subvolume to a qgroup. This option can be given multiple +times. +.RE .TP \fBsubvolume get-default\fR\fI path\fR -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord

[PATCH v2] btrfs-progs: allow use of subvolume id to create snapshots

2014-03-25 Thread Jeff Mahoney
of this patch missed an error printing case and would print (null) instead of the subvolume id on error. Signed-off-by: Jeff Mahoney je...@suse.com --- cmds-subvolume.c | 105 +-- ioctl.h |6 ++- man/btrfs.8.in | 31

Re: [PATCH v2] btrfs-progs: allow use of subvolume id to create snapshots

2014-03-25 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/25/14, 9:48 AM, Hugo Mills wrote: On Tue, Mar 25, 2014 at 09:37:13AM -0400, Jeff Mahoney wrote: This patch uses the new BTRFS_SUBVOL_CREATE_SUBVOLID flag to create snapshots by subvolume ID. usage: btrfs subvolume snapshot [-r] [-q qgroupid

[PATCH] btrfs: fix lockdep warning with reclaim lock inversion

2014-03-26 Thread Jeff Mahoney
] grab_super_passive+0x3f/0x90 Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -8343,9 +8343,15 @@ static void __link_block_group(struct bt

Re: [PATCH 3/4][RFC] btrfs: export global block reserve size as space_info

2014-04-04 Thread Jeff Mahoney
up with Jeff on it. I like the idea of combining this into SPACE_INFO, any objections? Sorry, was on vacation when this went by and just got the ping. Yeah, I have no objections here. - -Jeff - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin

Re: [PATCH] btrfs: fix lockdep warning with reclaim lock inversion

2014-04-09 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/9/14, 12:05 PM, Filipe David Manana wrote: On Wed, Mar 26, 2014 at 6:11 PM, Jeff Mahoney je...@suse.com wrote: When encountering memory pressure, testers have run into the following lockdep warning. It was caused by __link_block_group

[PATCH] btrfs: fix lockdep warning with reclaim lock inversion

2014-04-09 Thread Jeff Mahoney
: (type-s_umount_key#27){..}, at: [811bac6f] grab_super_passive+0x3f/0x90 Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c

Re: [PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-21 Thread Jeff Mahoney
On 05/21/2014 08:12 PM, Chris Mason wrote: The Btrfs sysfs code removes entries for raid types that are no longer in use. This means that if you have a raid0 FS and use balance to turn it into a raid1 FS, the raid0 sysfs entries will go away. The rough chain of events is:

Re: [PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-22 Thread Jeff Mahoney
to reinitialize it. - -Jeff - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQIcBAEBAgAGBQJTfhJBAAoJEB57S2MheeWymZoP/Ru0dB9DDQW7eCgeOuXTNMZt uy29gJsUjC6QoQagJ0aHT1SiNw9EFHuDnfrnUaOGxO2l0dDostdrU4xqH/632xVv 9o4QrTWtg0d7mN2+D4YaYLB/74Nd1O86CE

Re: [PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-23 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/23/14, 8:38 AM, David Sterba wrote: On Thu, May 22, 2014 at 01:17:50PM -0400, Chris Mason wrote: On 05/22/2014 11:05 AM, Jeff Mahoney wrote: - gpg control packet On 5/22/14, 8:19 AM, Chris Mason wrote: Can we safely reinit a kobject that has

Re: [PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-23 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/23/14, 10:32 AM, David Sterba wrote: On Fri, May 23, 2014 at 08:56:06AM -0400, Jeff Mahoney wrote: Sigh. Yep. kobject_cleanup caches -name before the release function and ignores the cleared value. It seems the free name if we alloced

Re: [PATCH] Btrfs: don't remove raid type sysfs entries until unmount

2014-05-23 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/23/14, 10:34 AM, Jeff Mahoney wrote: On 5/23/14, 10:32 AM, David Sterba wrote: On Fri, May 23, 2014 at 08:56:06AM -0400, Jeff Mahoney wrote: Sigh. Yep. kobject_cleanup caches -name before the release function and ignores the cleared value

[PATCH] btrfs: allocate raid type kobjects dynamically

2014-05-23 Thread Jeff Mahoney
and kobject_del do that internally. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |8 +++- fs/btrfs/extent-tree.c | 33 + fs/btrfs/sysfs.c |5 +++-- 3 files changed, 31 insertions(+), 15 deletions(-) --- a/fs/btrfs

Re: [PATCH] btrfs: allocate raid type kobjects dynamically

2014-05-23 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/23/14, 3:04 PM, Jeff Mahoney wrote: We are currently allocating space_info objects in an array when we allocate space_info. When a user does something like: # btrfs balance start -mconvert=raid1 -dconvert=raid1 /mnt # btrfs balance start

[PATCH v2] btrfs: allocate raid type kobjects dynamically

2014-05-23 Thread Jeff Mahoney
and kobject_del do that internally. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |8 +++- fs/btrfs/extent-tree.c | 35 ++- fs/btrfs/sysfs.c |5 +++-- 3 files changed, 32 insertions(+), 16 deletions(-) --- a/fs/btrfs

Re: [PATCH] btrfs: allocate raid type kobjects dynamically

2014-05-23 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/23/14, 3:41 PM, Jeff Mahoney wrote: On 5/23/14, 3:04 PM, Jeff Mahoney wrote: We are currently allocating space_info objects in an array when we allocate space_info. When a user does something like: # btrfs balance start -mconvert=raid1

[PATCH] btrfs: handle add/remove of sysfs links when devices are added/removed

2014-05-23 Thread Jeff Mahoney
btrfs currently publishes device membership via sysfs based on the devices present when the file system is mounted. That publishing is not updated when devices are added or removed while mounted. This patch handles those events. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c

Re: [PATCH v2] btrfs: allocate raid type kobjects dynamically

2014-05-26 Thread Jeff Mahoney
+0x16/0x1b -- 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 - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2

[PATCH v3] btrfs: allocate raid type kobjects dynamically

2014-05-26 Thread Jeff Mahoney
and kobject_del do that internally. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |8 +++- fs/btrfs/extent-tree.c | 39 ++- fs/btrfs/sysfs.c |5 +++-- 3 files changed, 36 insertions(+), 16 deletions(-) --- a/fs/btrfs

Re: [PATCH v3] btrfs: allocate raid type kobjects dynamically

2014-05-27 Thread Jeff Mahoney
+0x53/0x80 [ 229.850788] [81a16cd2] system_call_fastpath+0x16/0x1b - -- Jeff Mahoney SUSE Labs -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQIcBAEBAgAGBQJThIGTAAoJEB57S2MheeWyxjUQAIYFZ2JM974A4fEkDxbz4yDK

[PATCH v4] btrfs: allocate raid type kobjects dynamically

2014-05-27 Thread Jeff Mahoney
and kobject_del do that internally. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |8 +++- fs/btrfs/extent-tree.c | 39 ++- fs/btrfs/sysfs.c |5 +++-- 3 files changed, 36 insertions(+), 16 deletions(-) --- a/fs/btrfs

Re: [PATCH v4] btrfs: allocate raid type kobjects dynamically

2014-05-27 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/27/14, 1:22 PM, Chris Mason wrote: On 05/27/2014 01:08 PM, Chris Mason wrote: On 05/27/2014 12:59 PM, Jeff Mahoney wrote: We are currently allocating space_info objects in an array when we allocate space_info. When a user does something

[PATCH] btrfs: free delayed node outside of root-inode_lock

2014-05-27 Thread Jeff Mahoney
On heavy workloads, we're seeing soft lockup warnings on root-inode_lock in __btrfs_release_delayed_node. The low hanging fruit is to reduce the size of the critical section. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/delayed-inode.c | 7 +-- 1 file changed, 5 insertions(+), 2

[PATCH] btrfs-progs: canonicalize pathnames for device commands

2014-06-04 Thread Jeff Mahoney
the same canonicalization of the paths that mount does so that we don't end up having inconsistent names reported by -show_devices later. Signed-off-by: Jeff Mahoney je...@suse.com --- cmds-device.c | 60 - cmds-replace.c | 13

[PATCH] btrfs: Make extent-io callbacks that never fail return void

2011-07-21 Thread Jeff Mahoney
of these hooks execute under a spinlock, they're necessarily simple. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c | 52 +-- fs/btrfs/extent_io.h | 18 - fs/btrfs/inode.c | 26

[patch 0/9] btrfs: More error handling patches

2011-08-10 Thread Jeff Mahoney
Hi all - The following 8 patches add more error handling to the btrfs code: - Add btrfs_panic - Catch locking failures in {set,clear}_extent_bit - Push up set_extent_bit errors to callers - Push up lock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up

Device files on read-only file systems?

2011-08-15 Thread Jeff Mahoney
Hi all - btrfs_permission currently returns -EROFS when the root is set read-only and the open is requested read-write. It doesn't make an exception for device files. Is this intentional? -Jeff -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

[patch v2 4/9] btrfs: Push up lock_extent errors to callers

2011-08-15 Thread Jeff Mahoney
lock_extent, try_lock_extent, and lock_extent_bits can't currently fail because errors are caught via BUG_ON. This patch pushes the error handling up to callers, which currently only handle them via BUG_ON themselves. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c

[patch v2 5/9] btrfs: Push up clear_extent_bit errors to callers

2011-08-15 Thread Jeff Mahoney
clear_extent_bit can fail with -ENOMEM for a specific case but will BUG on other memory allocation failures. This patch returns -ENOMEM for memory allocation failures and handles them with BUG_ON in callers which don't handle it already. Signed-off-by: Jeff Mahoney je...@suse.com --- fs

[patch 02/65] btrfs: Catch locking failures in {set,clear}_extent_bit

2011-10-04 Thread Jeff Mahoney
The *_state functions can only return 0 or -EEXIST. This patch addresses the cases where those functions return -EEXIST, representing a locking failure. It handles them by panicking with an appropriate error message. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c | 41

[patch 09/65] btrfs: pin_down_extent should return void

2011-10-04 Thread Jeff Mahoney
if memory can't be allocated - Since it's called with gfp_flags __GFP_NOFAIL, this failure case can't occur. With no failure cases, it should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions

  1   2   3   4   5   6   7   8   >