Re: [PATCH 3/3] btrfs: fix inline compressed read err corruption

2014-05-09 Thread David Sterba
in the code that introduced it. The changes that could have affected that are in the error handling, but even with that in mind, the silent error does not make sense. Signed-off-by: Zach Brown z...@redhat.com Reviewed-by: David Sterba dste...@suse.cz And future ACK if you're going to kill the memset

Re: Fwd: [suggestion] Add verbose notification about inode-cache rebuild to kernel log

2014-05-09 Thread David Sterba
On Thu, May 08, 2014 at 04:22:13PM +0200, Tomáš Pružina wrote: I ran into some troubles with inode-cache rebuilding on root fs after filesystem was mounted without inode_cache, which stalls boot of my box by several minutes. I boot from commandline like: root=/dev/sda4 rootfstype=btrfs

Re: superfluous else if ()

2014-05-09 Thread David Sterba
On Sat, Apr 26, 2014 at 08:57:00PM +0200, Toralf Förster wrote: /me wonders if this if (ret = 0) { /* Add an item for the type for the first time */ eb = path-nodes[0]; slot = path-slots[0]; offset =

Re: File capabilities are lost when sending/receiving a btrfs subvolume

2014-05-09 Thread David Sterba
On Wed, Apr 30, 2014 at 10:00:29AM -0600, Chris Murphy wrote: On Apr 29, 2014, at 1:21 PM, Juan Orti Alcaine juan.o...@miceliux.com wrote: Hello, I noticed that file capabilites are lost on received subvolumes, so I opened the bug report #68891 [1]. I don't know if other xattrs are

Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check

2014-05-12 Thread David Sterba
On Thu, May 08, 2014 at 09:40:03AM +0800, Qu Wenruo wrote: Original Message Subject: Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check From: David Sterba dste...@suse.cz To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2014年04月18日 22:48 On Thu, Apr 17, 2014 at 08:47:28AM

Re: superfluous else if ()

2014-05-12 Thread David Sterba
On Fri, May 09, 2014 at 07:12:54PM +0200, Toralf Förster wrote: But what came into my mind, wouldn't the following avoid such question in future ? : Yes and though it's a tiny change, I don't mind a patch for that. } else { /* ret 0 */ The comment is IMHO

Re: [PATCH 1/3] btrfs: return errno instead of -1 from compression

2014-05-12 Thread David Sterba
On Fri, May 09, 2014 at 01:40:15PM -0700, Zach Brown wrote: @@ -335,7 +335,7 @@ cont: break; if (page_in_index + 1 = total_pages_in) { - ret = -1; + ret =

Re: Fwd: [suggestion] Add verbose notification about inode-cache rebuild to kernel log

2014-05-12 Thread David Sterba
On Fri, May 09, 2014 at 08:12:54PM +0200, Goffredo Baroncelli wrote: Adding the printk is probably a good thing, but I'd rather reconsider using inode_cache at all. IMO it's supposed to fix problems with inode numbers that we don't have. IIRC, the problem is for the 32 bit system, were

Re: -musage=0 means always reporting relocation

2014-05-12 Thread David Sterba
On Sun, May 11, 2014 at 04:11:56PM +0200, Brendan Hide wrote: On 2014/05/11 11:52 AM, Russell Coker wrote: On Sun, 11 May 2014, Russell Coker russ...@coker.com.au wrote: Below is the output of running a balance a few times on a 120G SSD. Sorry forgot to mention that's kernel 3.14.1 Debian

Re: known UUID and metadata consistency

2014-05-12 Thread David Sterba
On Sun, May 11, 2014 at 10:10:41AM +0100, Hugo Mills wrote: a) The chunk tree is whole and consistent b) We need to (or have been asked to) rebuild the chunk tree from scratch So I think, yes, you can make fake metadata blocks, but you have to rely on either (a) your fake data being

Re: [PATCH 3/3] btrfs: fix inline compressed read err corruption

2014-05-12 Thread David Sterba
On Mon, May 12, 2014 at 11:00:23PM +0800, Liu Bo wrote: On Thu, May 08, 2014 at 07:16:19PM -0400, Zach Brown wrote: uncompress_inline() is silently dropping an error from btrfs_decompress() after testing it and zeroing the page that was supposed to hold decompressed data. This can silently

Re: Fwd: [suggestion] Add verbose notification about inode-cache rebuild to kernel log

2014-05-13 Thread David Sterba
On Mon, May 12, 2014 at 08:18:04PM +0200, Goffredo Baroncelli wrote: To be clear, I would like to avoid inode_cache on 64bit machine. In order to avoid the risk to exhaust the inode on 32bit and to be backward compatible with what already exists, we could add a flag to mkfs.btrfs to be only

Re: [PATCH v2 1/3] btrfs: return errno instead of -1 from compression

2014-05-14 Thread David Sterba
On Fri, May 09, 2014 at 05:15:08PM -0400, Zach Brown wrote: --- a/fs/btrfs/zlib.c +++ b/fs/btrfs/zlib.c @@ -136,7 +136,7 @@ static int zlib_compress_pages(struct list_head *ws, if (workspace-def_strm.total_in 8192 workspace-def_strm.total_in

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

2014-05-14 Thread David Sterba
On Wed, May 14, 2014 at 09:41:19AM -0500, Eric Sandeen wrote: I am not against this option; I am suggesting to add a explicit warning to the user about the risk of doing that, both on the man pages and into the program. The warning should say that this option is only for testing. Better

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

2014-05-14 Thread David Sterba
Thanks for adding the uuid uniqueness check, that was my major objection for previous patch iterations, http://www.spinics.net/lists/linux-btrfs/msg30572.html we can now use it for convert as well (to generate or copy the uuid). On Wed, May 14, 2014 at 10:35:05AM -0500, Eric Sandeen wrote: @@

Re: [PATCH 07/14] btrfs-progs: Print more info about device sizes

2014-05-14 Thread David Sterba
On Wed, Apr 30, 2014 at 02:31:18PM +0100, Frank Kingswood wrote: Device size:10.00GiB FS occuppied:5.00GiB I found a bit unclear the FS occupied terms. We're running out of terms to describe and distinguish the space that the filesystem uses. 'occupied'

[PATCH] btrfs-progs: hide 'FS occupied' from device usage output for now

2014-05-14 Thread David Sterba
The term has not seen an agreement and we don't want to change it once it's in non-development branches or even released. Discussion under the patch: http://thread.gmane.org/gmane.comp.file-systems.btrfs/34627 Signed-off-by: David Sterba dste...@suse.cz --- Some variant based on of the terms

[PATCH] btrfs: remove newline from inode cache ktread name

2014-05-15 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/inode-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index 86935f5ae291..888fbe19079f 100644 --- a/fs/btrfs/inode-map.c +++ b/fs/btrfs/inode-map.c @@ -174,7 +174,7

Re: [PATCH 1/2] btrfs-progs: add sys_chunk_array and backup roots info to show-super

2014-05-15 Thread David Sterba
On Thu, May 08, 2014 at 11:03:57AM +0800, Gui Hecheng wrote: Add sys chunk array and backup roots info if the new option '-f' if specified. This may be useful for debugging sys_chunk related issues. Sounds useful. One comment below. +static void print_sys_chunk_array(struct btrfs_super_block

Re: [PATCH] Btrfs-progs: add xxhash

2014-05-15 Thread David Sterba
Obviously I can't put that patch into progs integration as it's changing the default behaviour. You can add #ifdefs if you want. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] Btrfs-progs: save us an unnecessary ioctl call

2014-05-15 Thread David Sterba
On Tue, May 13, 2014 at 05:05:05PM +0800, Wang Shilong wrote: Btrfs device id start from 1, not 0. --- a/utils.c +++ b/utils.c @@ -1765,7 +1765,7 @@ int get_fs_info(char *path, struct btrfs_ioctl_fs_info_args *fi_args, goto out; } - for (; i = fi_args-max_id;

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

2014-05-15 Thread David Sterba
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; - uuid_generate(super.fsid); + if (fs_uuid)

Re: known UUID and metadata consistency

2014-05-15 Thread David Sterba
On Mon, May 12, 2014 at 07:10:17PM +0200, David Sterba wrote: One thing that looks as a show stopper is the fact that the fake data blocks that would become the metadata blocks would lie out of any metadata group. I'm not familiar with the chunk rebuilder, but this seems as a simple check

Re: [PATCH] Btrfs-progs: save us an unnecessary ioctl call

2014-05-16 Thread David Sterba
On Fri, May 16, 2014 at 12:58:46PM +0800, Wang Shilong wrote: Hi Anand, On 05/16/2014 12:32 PM, Anand Jain wrote: David, As mentioned, this patch will back-out the earlier patch 50275bacab0f62b91453fbfa29e75c2bb77bf9b6 I am confused on what I am missing ? Any comment? You are

[PATCH v2] btrfs: remove newline from inode cache kthread name

2014-05-16 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- Sorry for the stupid typo in subject, I'm resending so there's a correct patch in patchwork. fs/btrfs/inode-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index 86935f5ae291

Re: [PATCH 3/3] btrfs check: Attempt to fix misordered keys with bitflips in them

2014-05-16 Thread David Sterba
On Mon, May 05, 2014 at 06:07:51PM +0100, Hugo Mills wrote: If precisely one of those bitflips puts the broken key back into order relative to its two neighbours, we probably have a fix for the bitflip, and so we write it back to the FS. This sounds safe enough to me. I'll add the patch to

Re: [PATCH 3/3] btrfs-progs: add quota group verify code

2014-05-16 Thread David Sterba
On Wed, May 07, 2014 at 01:07:17PM -0700, Mark Fasheh wrote: +struct ref { + u64 bytenr; + u64 num_bytes; + u64 parent; + u64 root; + + struct rb_node bytenr_node; +}; A way too

Re: [PATCH 0/3] btrfs-progs: add quota group verify to btrfsck

2014-05-16 Thread David Sterba
On Wed, May 07, 2014 at 01:07:14PM -0700, Mark Fasheh wrote: The first two patches set up for qgroups: - The change in patch #1 is optional. It corrects the print of qgroup bytes to be %llu as they are unsigned values. This means however that corrupted groups will no longer show a negative

Re: [PATCH] Btrfs-progs: fsck: add an option to check data csums

2014-05-16 Thread David Sterba
On Thu, May 08, 2014 at 01:48:43PM +0300, Konstantinos Skarlatos wrote: On 8/5/2014 4:26 πμ, Wang Shilong wrote: This patch adds an option '--check-data-csum' to verify data csums. fsck won't check data csums unless users specify this option explictly. Can this option be added to btrfs restore

Re: [PATCH v2] btrfs-progs: add sys_chunk_array and backup roots info to show-super

2014-05-16 Thread David Sterba
On Fri, May 16, 2014 at 09:23:37AM +0800, Gui Hecheng wrote: Add sys chunk array and backup roots info if the new option '-f' if specified. This may be useful for debugging sys_chunk related issues. Nice, thanks. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the

Re: [PATCH 2/3] btrfs-progs: add missing help option for rescue super-recover

2014-05-16 Thread David Sterba
On Thu, May 15, 2014 at 09:29:08AM +0800, Gui Hecheng wrote: Add '-h' option for help for super-recover, update the manpage at the same time. We don't have the short option for help, a few patches have been already rejected to change that. -- To unsubscribe from this list: send the line

Re: [PATCH 2/3] btrfs-progs: add missing help option for rescue super-recover

2014-05-16 Thread David Sterba
On Fri, May 16, 2014 at 06:37:27PM +0200, David Sterba wrote: On Thu, May 15, 2014 at 09:29:08AM +0800, Gui Hecheng wrote: Add '-h' option for help for super-recover, update the manpage at the same time. We don't have the short option for help, a few patches have been already rejected

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

2014-05-16 Thread David Sterba
On Thu, May 15, 2014 at 12:53:52PM -0500, Eric Sandeen wrote: So, in my testing, I found that re-mkfsing a device with the same UUID lead to weird distant segfaults in other bits of code. Probably due to the uuid cache? /handwave - I didn't dig into it, because ... Ok, something that needs

Re: [PATCH 00/27] Replace the old man page with asciidoc and man page for each btrfs subcommand.

2014-05-19 Thread David Sterba
On Sat, May 17, 2014 at 06:43:15PM +0100, Hugo Mills wrote: I've just been poking around in the docs for a completely different reason, and I think there's a fairly serious problem (well, as serious as problems get with documentation). Take, for example, the format for btrfs fi resize:

Re: [PATCH 00/27] Replace the old man page with asciidoc and man page for each btrfs subcommand.

2014-05-19 Thread David Sterba
On Mon, May 19, 2014 at 04:01:23PM +0200, David Sterba wrote: On Sat, May 17, 2014 at 06:43:15PM +0100, Hugo Mills wrote: I've just been poking around in the docs for a completely different reason, and I think there's a fairly serious problem (well, as serious as problems get

[PATCH 0/5] Documentation updates

2014-05-19 Thread David Sterba
Formatting changes inspired by Hugo's mail and some fixes that I found along the way. The update in Availability section removes the heavy development not usable text. David Sterba (5): btrfs-progs: doc: fix argument notation and typos btrfs-progs: doc: remove text for unmerged features

[PATCH 1/5] btrfs-progs: doc: fix argument notation and typos

2014-05-19 Thread David Sterba
All user-supplied values should be enclosed in ... to distinguish them from verbatim strings. Signed-off-by: David Sterba dste...@suse.cz --- Documentation/btrfs-balance.txt | 6 +++--- Documentation/btrfs-check.txt| 2 +- Documentation/btrfs-filesystem.txt | 10

[PATCH 5/5] btrfs-progs: doc: update the Availability section

2014-05-19 Thread David Sterba
Does not reflect the current state. The wiki contains more details on the first page. Signed-off-by: David Sterba dste...@suse.cz --- Documentation/btrfs-balance.txt | 4 +--- Documentation/btrfs-check.txt| 4 +--- Documentation/btrfs-device.txt | 4

[PATCH 2/5] btrfs-progs: doc: remove text for unmerged features

2014-05-19 Thread David Sterba
The asciidoc conversion was done on a development branch and there are portions of text that do not reflect the code. Signed-off-by: David Sterba dste...@suse.cz --- Documentation/btrfs-device.txt | 5 - Documentation/btrfs-filesystem.txt | 46 +- 2

[PATCH 4/5] btrfs-progs: doc: make all commands and subcommands bold

2014-05-19 Thread David Sterba
Italic format is used for parameters and values, bold makes the text visually separated. Signed-off-by: David Sterba dste...@suse.cz --- Documentation/btrfs-balance.txt | 22 +++ Documentation/btrfs-check.txt| 14 +- Documentation/btrfs-convert.txt

Re: [PATCH 00/27] Replace the old man page with asciidoc and man page for each btrfs subcommand.

2014-05-20 Thread David Sterba
On Tue, May 20, 2014 at 08:34:19AM +0800, Qu Wenruo wrote: Proposed changes: - format all subcommands as bold instead of italic ('' - **) - add all missing ... - find a way how to add '...' around ... (xsl or sed or whatever) Does that work for you? That is OK for me, I'll investigate it.

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

2014-05-20 Thread David Sterba
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 command is echo -n test

Re: [PATCH 2/2 v2] btrfs: usage error should not be logged into system log

2014-05-20 Thread David Sterba
and efforts analyzing messages files. Having usage error logged into /var/log/messages is something we should avoid. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz In this case the source of the error is only one and the label constraints are simple, so

Re: What do the wait_current_trans messages mean I see on my raspberry pi?

2014-05-20 Thread David Sterba
On Sun, May 18, 2014 at 09:48:17PM +0200, Clemens Eisserer wrote: Over the weekend I tried to copy one external usb drive (on ext4) to another one formatted with btrfs. Now I came back, and 48h later only ~300GB were copied and I found messages like the following on syslog: That's about 1

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

2014-05-22 Thread David Sterba
On Thu, May 22, 2014 at 06:41:11PM +0800, Anand Jain wrote: @@ -385,7 +392,8 @@ static ssize_t btrfs_label_store(struct kobject *kobj, return PTR_ERR(trans); spin_lock(root-fs_info-super_lock); - strcpy(fs_info-super_copy-label, buf); +

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

2014-05-23 Thread David Sterba
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 been put in use in sysfs? Given all the things that can hold refs etc is this

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

2014-05-23 Thread David Sterba
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 it comment in there was leftover from the middle of a patch series Kay applied in late 2007.

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

2014-05-26 Thread David Sterba
This patch + the fix to add/remove links on the respective device operation seem to work with the previous test that used to catch the slab corruptions, so far so good. After this has been running fine for a few hours, I've tried to do a simple check # cd /sys/fs/btrfs # find . -type f -exec

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

2014-05-26 Thread David Sterba
/fsid/label This patch will check for this user error Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz Thanks. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo

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

2014-05-27 Thread David Sterba
A different lockdep chain, from test btrfs/014: [ 229.850151] == [ 229.850788] [ INFO: possible circular locking dependency detected ] [ 229.850788] 3.15.0-rc7-default+ #146 Tainted: GW [ 229.850788]

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

2014-05-27 Thread David Sterba
On Tue, May 27, 2014 at 08:14:11AM -0400, Jeff Mahoney wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/27/14, 7:26 AM, David Sterba wrote: A different lockdep chain, from test btrfs/014: Are you sure this one was with the new patch? We shouldn't be holding groups_sem anymore

Re: [PATCH v2] Btrfs: set dead flag on the right root when destroying snapshot

2014-05-27 Thread David Sterba
/send.data The send command failed because the send ioctl returned -EPERM. A test case for xfstests follows. Signed-off-by: Filipe David Borba Manana fdman...@gmail.com Reviewed-by: David Sterba dste...@suse.cz Thanks for catching it, I was so focused on verifying the locks to do what

Re: [PATCH] Btrfs: clear compress-force when remounting with compress option

2014-05-27 Thread David Sterba
On Fri, May 23, 2014 at 11:36:52AM +0800, Wang Shilong wrote: --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -513,6 +513,14 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) btrfs_info(root-fs_info,

Re: [PATCH] btrfs-show-super: don't try to print not-superblocks

2014-05-28 Thread David Sterba
On Tue, May 13, 2014 at 09:03:04PM -0500, Eric Sandeen wrote: If we point btrfs-show-super at a not-btrfs-device and try to print all superblocks, bad things are apt to happen: superblock: bytenr=274877906944, device=/dev/sdc2 -

Re: [PATCH 1/3] btrfs-progs: cleanup btrfs-rescue output msgs

2014-05-28 Thread David Sterba
On Thu, May 15, 2014 at 09:29:07AM +0800, Gui Hecheng wrote: Use enum defined error codes to represent different kinds of errs for super-recover and chunk-recover. I think this change hides the low-level errors (like ENOMEM) that can possibly result into recovery not possible, though it can be

Re: [PATCH] btrfs-progs: provide better error message for raid profile mismatch

2014-05-28 Thread David Sterba
On Fri, May 16, 2014 at 05:20:56PM +0900, Hidetoshi Seto wrote: Current error messages are like following: Error: unable to create FS with metadata profile 32 (have 2 devices) Error: unable to create FS with metadata profile 256 (have 2 devices) Obviously it is hard for users to

Re: [PATCH] btrfs-image: Fix a data race in build_chunk_tree.

2014-05-28 Thread David Sterba
On Sun, May 18, 2014 at 10:40:42PM -0700, Adam Buchbinder wrote: A mdrestore_struct was being written to without its mutex being held. This race was found with ThreadSanitizer; the relevant part of the report looks like this: WARNING: ThreadSanitizer: data race (pid=18828) Write of size 8

Re: [PATCH] btrfs-progs: Improve the parse_size() error message.

2014-05-28 Thread David Sterba
On Tue, May 20, 2014 at 03:51:45PM +0800, Qu Wenruo wrote: When using parse_size(), even non-numeric value is passed, it will only give error message ERROR: size value is empty, which is quite confusing for end users. This patch will introduce more meaningful error message for the following

Re: [PATCH] Add some simple end-to-end tests for btrfs-convert.

2014-05-28 Thread David Sterba
On Wed, May 21, 2014 at 10:20:27AM -0700, Adam Buchbinder wrote: These use the system's mke2fs, and don't require loop devices or root privileges. Nice, thanks. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More

Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device add/remove.

2014-05-29 Thread David Sterba
On Wed, Apr 16, 2014 at 05:02:32PM +0800, Qu Wenruo wrote: @@ -1704,10 +1720,14 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) ret = 0; - /* Notify udev that device has changed */ - if (bdev) + if (bdev) { + /* Notify udev that device

Re: [PATCH 4/4] btrfs: create sprout should rename fsid on the sysfs as well

2014-05-29 Thread David Sterba
On Mon, May 26, 2014 at 05:30:26PM +0800, Anand Jain wrote: --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2084,6 +2084,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) mutex_unlock(root-fs_info-fs_devices-device_list_mutex); if (seeding_dev)

Re: [PATCH 1/4] btrfs: dev delete should remove sysfs entry

2014-05-29 Thread David Sterba
is too generic for a non-static function, so it would be good to add at least the btrfs_ prefix. Same applies to the change of 'add_device_membership' in the next patch. As this is only a trivial change, consider this Reviewed-by: David Sterba dste...@suse.cz +{ + struct hd_struct *disk

Re: [PATCH 3/4] btrfs: dev replace should replace the sysfs entry

2014-05-29 Thread David Sterba
On Mon, May 26, 2014 at 05:30:25PM +0800, Anand Jain wrote: when we replace the device its corresponding sysfs entry has to be replaced as well Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/dev-replace.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff

Re: [PATCH 2/4] btrfs: dev add should add its sysfs entry

2014-05-29 Thread David Sterba
On Mon, May 26, 2014 at 05:30:24PM +0800, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com we would need the device links to be created, when device is added. Looks good (plus the btrfs_ prefix mentioned before). Reviewed-by: David Sterba dste...@suse.cz I was comparing

Re: [PATCH 1/4] btrfs: dev delete should remove sysfs entry

2014-05-30 Thread David Sterba
On Fri, May 30, 2014 at 02:10:28PM +0800, Anand Jain wrote: @@ -572,6 +572,26 @@ static void init_feature_attrs(void) } } +int rm_device_membership(struct btrfs_fs_info *fs_info, + struct btrfs_device *one_device) The name is too generic for a non-static function, so it

Re: [PATCH 4/4] btrfs: create sprout should rename fsid on the sysfs as well

2014-06-02 Thread David Sterba
On Mon, Jun 02, 2014 at 04:22:20PM +0800, Anand Jain wrote: --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2084,6 +2084,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) mutex_unlock(root-fs_info-fs_devices-device_list_mutex); if (seeding_dev) { +

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

2014-06-02 Thread David Sterba
On Wed, May 28, 2014 at 07:20:38PM +0800, Wang Shilong wrote: --- a/cmds-check.c +++ b/cmds-check.c @@ -6810,8 +6810,7 @@ int cmd_check(int argc, char **argv) int option_index = 0; int init_csum_tree = 0; int qgroup_report = 0; - enum btrfs_open_ctree_flags ctree_flags

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

2014-06-02 Thread David Sterba
On Thu, May 29, 2014 at 05:59:56PM +0800, Wang Shilong wrote: The reason that we allow partial opening is that sometimes, we may have some corrupted trees.(for example extent tree), for fsck repair case, the broken tree may be rebuilt later. So if users only want to do check but not repair

Re: [PATCH v2 3/4] Btrfs-progs: fsck: deal with corrupted csum root

2014-06-02 Thread David Sterba
On Thu, May 29, 2014 at 05:59:57PM +0800, Wang Shilong wrote: If checksum root is corrupted, fsck will get segmentation. This is because if we fail to load checksum root, root's node is NULL which cause NULL pointer deferences later. To fix this problem, we just did something like extent

Re: [PATCH] btrfs-progs: Add dev uuid output for print_dev_item().

2014-06-02 Thread David Sterba
On Thu, May 29, 2014 at 08:52:04PM +0100, Mike Fleetwood wrote: On 29 May 2014 02:02, Qu Wenruo quwen...@cn.fujitsu.com wrote: The original print_dev_item() only prints device id,total bytes and bytes used. When it comes to debug things related to duplicated device id, dev uuid is needed

Re: [PATCH 1/1] btrfs-progs: fix build, manpage compression command

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 08:09:25AM +0200, Christian Hesse wrote: man pages for btrfs-progs are compressed by gzip by default. In Makefile the variable GZIP is use, this evaluates to 'gzip gzip' on my system. From man gzip: The environment variable GZIP can hold a set of default options for

Re: [PATCH] btrfs-progs: doc: link btrfsck to btrfs-check

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 10:38:16AM +0100, WorMzy Tykashi wrote: I noticed this in another thread: On 3 June 2014 10:14, David Sterba dste...@suse.cz wrote: I've assembled a branch containing doc-only fixes, including this one, and asked Chris do do a 3.14.3 release. Does this branch

Re: [PATCH 2/6 v2] btrfs: dev delete should remove sysfs entry

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:36:00AM +0800, Anand Jain wrote: when we delete the device from the mounted btrfs, we would need its corresponding sysfs enty to be removed as well. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from

Re: [PATCH 3/6 v2] btrfs: dev add should add its sysfs entry

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:36:01AM +0800, Anand Jain wrote: we would need the device links to be created, when device is added. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

Re: [PATCH 1/6 v2] btrfs: rename add_device_membership to btrfs_kobj_add_device

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:35:59AM +0800, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz Thanks. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [PATCH 4/6 v2] btrfs: dev replace should replace the sysfs entry

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:36:02AM +0800, Anand Jain wrote: when we replace the device its corresponding sysfs entry has to be replaced as well Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line

Re: [PATCH 3/4] btrfs: dev replace should replace the sysfs entry

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:47:42AM +0800, Anand Jain wrote: +/* replace the sysfs entry */ +rm_device_membership(fs_info, src_device); +add_device_membership(fs_info, tgt_device); + btrfs_rm_dev_replace_blocked(fs_info); btrfs_rm_dev_replace_srcdev(fs_info,

Re: [PATCH 5/6 v2] btrfs: create sprout should rename fsid on the sysfs as well

2014-06-03 Thread David Sterba
mount /dev/sdb /btrfs Error: kobject_add_internal failed for fe350492-dc28-4051-a601-e017b17e6145 with -EEXIST, don't try to register things with the same name in the same directory. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz

Re: [PATCH 6/6 RFC v2] btrfs: revamp /sys/fs/btrfs/fsid/devices

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:36:04AM +0800, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com As of now with out this patch the sysfs interface under dir /sys/fs/btrfs/fsid/devices is just link to the block devs. At this point it's part of the sysfs ABI and should not be changed.

Re: [PATCH 0/8] Add support for LZ4 compression

2014-06-03 Thread David Sterba
On Sat, May 31, 2014 at 11:48:28PM +, Philip Worrall wrote: LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. LZ4 gives a slightly worse compression ratio compared with LZO (and much worse than Zlib) but compression speeds are *generally*

Re: [PATCH v2 3/4] Btrfs-progs: fsck: deal with corrupted csum root

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 11:25:49AM +0800, Wang Shilong wrote: On 06/03/2014 01:27 AM, David Sterba wrote: On Thu, May 29, 2014 at 05:59:57PM +0800, Wang Shilong wrote: If checksum root is corrupted, fsck will get segmentation. This is because if we fail to load checksum root, root's node

Re: [PATCH 1/1] btrfs-progs: fix compiler warning

2014-06-03 Thread David Sterba
On Tue, Jun 03, 2014 at 01:29:19PM +0200, Christian Hesse wrote: gcc 4.9.0 gives a warning: array subscript is above array bounds Checking for greater or equal instead of just equal fixes this. That fixes the warning, but I don't see the code path that leads to level = BTRFS_MAX_LEVEL On

[PATCH] btrfs-progs: fsck: report each critical root corruption separately

2014-06-03 Thread David Sterba
Explicitly say which critical root is corrupted. It is possible to repair or reset some of the roots with a special option. CC: Wang Shilong wangsl.f...@cn.fujitsu.com Signed-off-by: David Sterba dste...@suse.cz --- Patch based on the fsck branch from integration with other fsck fixes, namely

Re: [PATCH 1/1] btrfs-progs: fix compiler warning

2014-06-04 Thread David Sterba
On Wed, Jun 04, 2014 at 09:19:26AM +0200, Christian Hesse wrote: It seems to be related to default gcc flags from distribution? Probably. I did compile with optimization, so adding -O2 may do the trick: make CFLAGS=${CFLAGS} -O2 all The warning appears with -O2, so the question is if gcc

Re: [PATCH 1/1] btrfs-progs: fix compiler warning

2014-06-10 Thread David Sterba
On Thu, Jun 05, 2014 at 10:59:37AM +0200, Christian Hesse wrote: David Sterba dste...@suse.cz on Wed, 2014/06/04 18:44: On Wed, Jun 04, 2014 at 09:19:26AM +0200, Christian Hesse wrote: It seems to be related to default gcc flags from distribution? Probably. I did compile

Re: [PATCH 0/8] Add support for LZ4 compression

2014-06-12 Thread David Sterba
On Wed, Jun 04, 2014 at 10:00:06AM -0400, Chris Mason wrote: I have a slightly different reason for holding off on these. Disk format changes are forever, and we need a really strong use case for pulling them in. The format upgrade is inevitable for full bidirectional interoperability of

Re: [PATCH] Add some simple end-to-end tests for btrfs-convert.

2014-06-12 Thread David Sterba
On Fri, May 30, 2014 at 08:26:02PM +0200, Julien Muchembled wrote: Le 05/21/14 19:20, Adam Buchbinder a écrit : + # 256MB is the smallest acceptable btrfs image. + dd if=/dev/zero of=$here/test.img bs=1024 count=$((256*1024)) \ +convert-tests-results.txt 21 || _fail dd

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

2014-06-12 Thread David Sterba
On Fri, May 30, 2014 at 11:27:14AM -0500, Eric Sandeen wrote: This is the most important patch ever. ;) Oh it is :) I found this to be less aesthetically pleasing than it was before: [CC] btrfstune.o Making all in Documentation ASCIIDOC btrfs-convert.xml [LD]

Re: [PATCH v2] btrfs-progs: Improve the parse_size() error message.

2014-06-12 Thread David Sterba
On Thu, May 29, 2014 at 09:42:11AM +0800, Qu Wenruo wrote: When using parse_size(), even non-numeric value is passed, it will only give error message ERROR: size value is empty, which is quite confusing for end users. This patch will introduce more meaningful error message for the following

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

2014-06-12 Thread David Sterba
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 more than once expressed a wish that mount

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

2014-06-14 Thread David Sterba
On Fri, Jun 13, 2014 at 04:46:25PM -0500, Eric Sandeen wrote: -+ fprintf(stderr, \t-F : attempt to dump superblocks with bad magic\n); + fprintf(stderr, \t-F : attempt to dump superblocks with bad magic\n); Whoa, git blame blames me, but that's not the patch I sent. ;) My mistak while

[nico-lkml-20110...@schottelius.org: Mis-Design of Btrfs?]

2011-06-24 Thread David Sterba
- Forwarded message from Nico Schottelius nico-lkml-20110...@schottelius.org - To: LKML linux-ker...@vger.kernel.org Date: Thu, 23 Jun 2011 12:53:37 +0200 From: Nico Schottelius nico-lkml-20110...@schottelius.org Subject: Mis-Design of Btrfs? Good morning devs, I'm wondering whether

Re: [PATCH] Btrfs: make sure to update total_bitmaps when freeing cache V2

2011-06-24 Thread David Sterba
On Thu, Jun 23, 2011 at 03:54:26PM -0400, Josef Bacik wrote: A user reported this bug again where we have more bitmaps than we are supposed to. This is because we failed to load the free space cache, but don't update the ctl-total_bitmaps counter when we remove entries from the tree. This

Re: Integration branch updated

2011-06-27 Thread David Sterba
On Sun, Jun 26, 2011 at 10:10:22PM +0100, Hugo Mills wrote: I've just updated the btrfs-progs integration branch I've been keeping. Not a huge amount new since last time: Andreas Philipp (1): print parent ID in btrfs subvolume list dunno if this has been mentioned already, but this

[PATCH for -rc6] btrfs: add missing options displayed in mount output

2011-06-28 Thread David Sterba
Hi Chris, I think this is patch should go into -rc6 series, it fixes a user-visible bug. I was confused when I did not see the inode_cache in mount output although I was sure (and verified in my script) that I had passed it to mount. thanks, david --- From: David Sterba dste...@suse.cz

Re: [PATCH v8 7/8] btrfs: Replication-type information

2011-06-28 Thread David Sterba
On Sun, Jun 26, 2011 at 09:36:54PM +0100, Hugo Mills wrote: diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 828aa34..fb11550 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -117,6 +117,52 @@ static void requeue_list(struct btrfs_pending_bios *pending_bios,

Re: [PATCH v8 2/8] btrfs: Cancel filesystem balance

2011-06-29 Thread David Sterba
On Wed, Jun 29, 2011 at 02:00:20PM +0800, Li Zefan wrote: Hugo Mills wrote: @@ -2149,6 +2150,10 @@ int btrfs_balance(struct btrfs_root *dev_root) bal_info-completed, bal_info-expected); } ret = 0; + if (bal_info-cancel_pending) { +

Re: [PATCH 11/16] Btrfs: clean up code for extent_map lookup

2011-07-22 Thread David Sterba
On Thu, Jul 14, 2011 at 11:18:15AM +0800, Li Zefan wrote: lookup_extent_map() and search_extent_map() can share most of code. Signed-off-by: Li Zefan l...@cn.fujitsu.com --- fs/btrfs/extent_map.c | 85 + 1 files changed, 29 insertions(+),

[RFC, crash][PATCH] btrfs: allow cross-subvolume file clone

2011-08-03 Thread David Sterba
/sda5 ie. plenty of free space. It's possible that I've omitted some important bits in the patch itself, or this exposes a bug of ENOSPC or delayed-inode. david --- From: David Sterba dste...@suse.cz Lift the EXDEV condition and allow different root trees for files being cloned, then pass source

Re: [PATCH] btrfs: do not allow mounting non-subvolumes via subvol option

2011-08-03 Thread David Sterba
On Fri, Jul 29, 2011 at 07:11:28PM +0200, Goffredo Baroncelli wrote: $ btrfs subvol list -p . ID 258 parent 5 top level 5 path subvol ID 259 parent 5 top level 5 path subvol1 ID 260 parent 5 top level 5 path default-subvol1 ID 262 parent 5 top level 5 path p1/p1-snapshot ID 263 parent 259

<    2   3   4   5   6   7   8   9   10   11   >