Re: segmentation fault while running btrfsck

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 01:34:48AM -0700, Nicholas Tung wrote: One of my btrfs volumes got corrupted, and seems to be unrecoverable. When I tried to run a recent version of btrfsck (built from git), it crashed with a segmentation fault. I have a file containing the first 8 GB (copied with

Re: [patch 1/2] Btrfs: double unlock bug in error handling

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 09:59:03AM +0300, Dan Carpenter wrote: The caller expects this function to return with the lock held and releases it immediately on error. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com Reviewed-by: David Sterba dste...@suse.cz Good catch, thanks

Re: [PATCH] Btrfs: always store the mirror we read the eb from

2012-04-18 Thread David Sterba
On Mon, Apr 16, 2012 at 09:42:26AM -0400, Josef Bacik wrote: --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -390,8 +390,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_root *root, if (!failed_mirror) { failed = 1; -

Re: [patch 1/2] Btrfs: double unlock bug in error handling

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 01:29:46PM +0200, Jan Schmidt wrote: I think the correct way to fix this is: diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index a844204..9af261a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2450,7 +2450,6 @@ again:

Re: Problems with nodatacow/nodatasum

2012-04-20 Thread David Sterba
On Fri, Apr 20, 2012 at 11:19:39AM +0300, Avi Kivity wrote: /dev/mapper/luks-blah / btrfs subvol=/rootvol1 1 /dev/mapper/luks-blah /var/lib/libvirt/images btrfs nodatasum,nodatacow,subvol=/images.libvirt1 2 what does /proc/mounts say about the

Re: [PATCH] Add missing unlocks on error paths

2012-04-25 Thread David Sterba
On Thu, Apr 26, 2012 at 12:04:51AM +0800, Daniel J Blueman wrote: Correctly drop locks during error cases. Signed-off-by: Daniel J Blueman dan...@quora.org --- fyi, the same patch is already present in for-linus, 871383be592ba7e819d27556591e315a0df38cee

Re: [PATCH 2/4] Btrfs: fix deadlock on sb-s_umount when doing umount

2012-04-26 Thread David Sterba
On Thu, Apr 26, 2012 at 10:58:04AM +0800, Miao Xie wrote: The reason the deadlock is that: TaskBtrfs-cleaner umount() down_write(s-s_umount) sync_filesystem() do auto-defragment and produce

Re: Interpreting Output of btrfs fi show

2012-04-26 Thread David Sterba
On Thu, Apr 26, 2012 at 01:11:00PM +0200, Helmut Hullen wrote: I now use to delete about the first 10 MByte of the target disk via dd if=/dev/zero FYI, the minimal amount of data you need to rewrite is 4k: dd if=/dev/zero of=/dev/ice bs=1k count=4 seek=64 david -- To unsubscribe from this

Re: Segfault on btrfs subvolume delete with kernel 3.3.4

2012-04-30 Thread David Sterba
On Mon, Apr 30, 2012 at 01:44:46PM +0200, Olivier Bonvalet wrote: Apr 30 13:37:05 frozen kernel: [ 238.508458] RIP: e030:[a004207f] [a004207f] btrfs_unlink_subvol+0x184/0x1f9 [btrfs] Apr 30 13:37:05 frozen kernel: [ 238.508496] RAX: ffe4 RBX: 880268af81b0 RCX:

Re: [PATCH 2/4] Btrfs: fix deadlock on sb-s_umount when doing umount

2012-04-30 Thread David Sterba
On Fri, Apr 27, 2012 at 06:55:13PM +0800, Miao Xie wrote: But I found you add a trylock for -s_umount in cleaner_kthread(), this method can fix the deadlock problem, I think. It may be introduced by the other patch, could you send that patch to me? I found if we fail to trylock

Re: could not do orphan cleanup - openSUSE 12.1

2012-05-02 Thread David Sterba
On Wed, May 02, 2012 at 12:02:34PM +0200, Henrik Kuhn wrote: I do observe a strange behavior upon booting of my openSUSE 12.1 system ( kernel 3.1.10-1.9-desktop; x86_64 ) with btrfsprogs-0.19-43.7.1.x86_64 utils installed: If you're using a kernel shipped by your distro, please open a bug

Re: [PATCH v2 1/5] btrfs: add command to zero out superblock

2012-05-02 Thread David Sterba
On Tue, May 01, 2012 at 02:40:29PM +0200, Hubert Kario wrote: +static const char * const cmd_zero_dev_usage[] = { + btrfs device zero-superblock device [device ...], FYI, this step is named 'clear superblock' in kernel code as done after the device is removed, and I suggest to consider to

Re: [PATCH v2 1/5] btrfs: add command to zero out superblock

2012-05-02 Thread David Sterba
On Wed, May 02, 2012 at 04:28:43PM +0200, David Sterba wrote: I had prototyped a similar utility (in perl, so nothing for progs inclusion for now) attached. david #!/usr/bin/perl # clear btrfs signature from a device use Fcntl; use constant BTRFS_SUPER_INFO_OFFSET = 64 * 1024; use constant

Re: Errors in rebalancing RAID1 array after disk failure.

2012-05-02 Thread David Sterba
On Thu, Apr 19, 2012 at 05:42:05PM +0200, Marco L. Crociani wrote: Apr 19 17:38:41 evo kernel: [ 347.661915] Call Trace: Apr 19 17:38:41 evo kernel: [ 347.661964] [a00b76ac] btrfs_ioctl_dev_info+0x15c/0x1a0 [btrfs] Apr 19 17:38:41 evo kernel: [ 347.662013] [a00ba9b1]

Re: Errors in rebalancing RAID1 array after disk failure.

2012-05-02 Thread David Sterba
On Mon, Apr 30, 2012 at 03:01:04PM +0200, Marco L. Crociani wrote: ./btrfs device delete missing /mnt/sda3 ERROR: error removing the device 'missing' - Input/output error Apr 30 13:17:57 evo kernel: [ 108.866205] btrfs: allowing degraded mounts Apr 30 13:17:57 evo kernel: [ 108.866214]

Re: Errors in rebalancing RAID1 array after disk failure.

2012-05-02 Thread David Sterba
On Wed, May 02, 2012 at 04:59:03PM +0200, Marco L. Crociani wrote: On Thu, Apr 19, 2012 at 05:42:05PM +0200, Marco L. Crociani wrote: Apr 19 17:38:41 evo kernel: [  347.661964]  [a00b76ac] btrfs_ioctl_dev_info+0x15c/0x1a0 [btrfs] [...] I was on 3.4-rc5! You really saw this crash

Re: [PATCH v2 1/5] btrfs: add command to zero out superblock

2012-05-02 Thread David Sterba
On Wed, May 02, 2012 at 06:42:16PM +0200, Hubert Kario wrote: A similar function in mdadm is called zero superblock so I just re used the name (according to the principle of least surprise). Users, even admins, generally don't read kernel code... I intended to point out that the

Re: [PATCH] Fix break before assignment

2012-05-03 Thread David Sterba
On Thu, May 03, 2012 at 09:44:49PM +0800, Daniel J Blueman wrote: Fix control flow to store count before breaking loop. http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg10483.html but it's a dead code anyway. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in

Re: Can't mount

2012-05-04 Thread David Sterba
On Fri, May 04, 2012 at 10:43:16AM +0700, Fajar A. Nugraha wrote: Is btrfs-zero-log still relevant? I imagine losing several last transactions is MUCH more convinient than having to recreate the enitre fs (even if restore managed to salvage everything). IMHO it is, a few days ago this helped

Re: [BUG] sleeping function called from atomic context

2012-05-04 Thread David Sterba
On Fri, May 04, 2012 at 09:25:36AM -0400, Chris Mason wrote: I'm having a hard time reproducing this here. Do you have lockdep on? It might tell us which lock we're leaving around. He's using SLUB and it does not like waiting allocations when CONFIG_SLUB_DEBUG is on: 445 #ifdef

Re: [PATCH] Add missing printing newlines

2012-05-07 Thread David Sterba
On Mon, May 07, 2012 at 01:38:51PM +0800, Daniel J Blueman wrote: Fix BTRFS messages to print a newline where there should be one. Please prefix the patch subject line with 'btrfs: ' --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1501,7 +1501,7 @@ static int btrfs_interface_init(void)

Re: btrfs and 1 billion small files

2012-05-07 Thread David Sterba
On Mon, May 07, 2012 at 11:28:13AM +0200, Alessio Focardi wrote: I tough about compression, but is not clear to me the compression is handled at the file level or at the block level. I don't recommend using compression for your expected file size range. Unless the files are highly compressible

[ANN] btrfs.wiki.kernel.org with up-to-date content again

2012-05-07 Thread David Sterba
Hi, the time of temporary wiki hosted at btrfs.ipv5.de is over, the content has been migrated back to official site at http://btrfs.wiki.kernel.org (ipv5.de wiki is set to redirect there). cheers, david -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of

Re: [PATCH 2/4] Btrfs: fix deadlock on sb-s_umount when doing umount

2012-05-08 Thread David Sterba
On Tue, May 08, 2012 at 06:38:01PM +0800, Miao Xie wrote: I think this method can not fix the problem safely because if the other background threads(not the cleaner) call shrink_delalloc(), the problem can still occur. And it does not indeed fix the problem completely, I found xfstests/269

Re: kernel 3.3.4 damages filesystem (?)

2012-05-08 Thread David Sterba
On Tue, May 08, 2012 at 08:41:47PM +0200, Felix Blanke wrote: As I've written some hours ago: I run btrfs fi balance ... after adding and after deleting a disk. Maybe it's not necessary. Especially it seems not to be necessary after adding a disk. What are the steps you're

Re: [PATCH 1/5] btrfs: extend readahead interface

2012-05-09 Thread David Sterba
On Thu, Apr 12, 2012 at 05:54:38PM +0200, Arne Jansen wrote: @@ -97,30 +119,87 @@ struct reada_machine_work { +/* + * this is the default callback for readahead. It just descends into the + * tree within the range given at creation. if an error occurs, just cut + * this part of the tree + */

Re: [PATCH] Btrfs: use ALIGN macro instead of open-coded expression

2012-05-09 Thread David Sterba
On Tue, May 08, 2012 at 04:16:24PM +0800, Yuanhan Liu wrote: According to section 'Find open-coded helpers or macros' at https://btrfs.wiki.kernel.org/index.php/Cleanup_ideas, here in the patch we use ALIGN macro to do the alignment. Well, I wrote this section and some time later also the

Re: Subdirectory creation on snapshot

2012-05-09 Thread David Sterba
On Mon, May 07, 2012 at 05:10:08PM -0700, Brendan Smithyman wrote: I'm experiencing some odd-seeming behaviour with btrfs on Ubuntu 12.04, using the Ubuntu x86-64 generic 3.2.0-24 kernel and btrfs-tools 0.19+20120328-1~precise1 (backported from the current Debian version using Ubuntu's

Re: [PATCH v2 1/5] btrfs: add command to zero out superblock

2012-05-09 Thread David Sterba
On Thu, May 03, 2012 at 03:11:45PM +0200, Hubert Kario wrote: nice, didn't know about this. Such functionality would be nice to have. But then I don't think that a recreate the array if the parameters are the same is actually a good idea, lots of space for error. A pair of functions: btrfs

Re: [RFC PATCH v2] Btrfs: improve space count for files with fragments

2012-05-09 Thread David Sterba
On Fri, Apr 27, 2012 at 09:44:13AM +0800, Liu Bo wrote: Let's take the above case: 0k 20k | --- extent --- | | - A - | 1k 19k And we assume that this extent starts from disk_bytenr on its FS logical offset. By splitting the [0k, 20k) extent, we'll get three

Re: Minimum device size of 256 MiB?

2012-05-14 Thread David Sterba
On Fri, May 11, 2012 at 03:57:24PM -0400, Berke Durak wrote: There seems to be a 256 MiB lower limit on device size : mkfs.btrfs refuses to create a filesystem on a device that is smaller than that. I was experimenting with the mkfs and sizes, and I found that: * mkfs crashes for sizes 4M *

Re: Subdirectory creation on snapshot

2012-05-14 Thread David Sterba
On Wed, May 09, 2012 at 10:38:30AM -0700, Brendan Smithyman wrote: If I understand you correctly, this would be the case with nested subvolumes; i.e., if subvolume A is exists within the directory tree subvolume B, and B is snapshotted. I expected this, and it sounds totally consistent with

Re: Problems with nodatacow/nodatasum

2012-05-15 Thread David Sterba
On Sun, May 13, 2012 at 08:51:53PM +0300, Avi Kivity wrote: On Sat, Apr 21, 2012 at 3:15 AM, Chris Mason chris.ma...@oracle.com wrote: Are there plans to allow per-subvolume nodatasum/nodatacow? It can be set on a per file basis, let me push out a commit to btrfs progs with ioctls to

Re: [PATCH v3 3/3] Btrfs: read device stats on mount, write modified ones during commit

2012-05-18 Thread David Sterba
On Wed, May 16, 2012 at 06:50:47PM +0200, Stefan Behrens wrote: --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -823,6 +823,26 @@ struct btrfs_csum_item { u8 csum; } __attribute__ ((__packed__)); +struct btrfs_device_stats_item { + /* + * grow this item struct at the

Re: [PATCH 4/5] Btrfs: cancel the scrub when remounting a fs to ro

2012-05-18 Thread David Sterba
On Thu, May 17, 2012 at 07:58:21PM +0800, Miao Xie wrote: --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1151,6 +1151,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) /* pause restriper - we want to resume on remount to r/w */

Re: [PATCH 1/2] Btrfs: do not resize a seeding device

2012-05-18 Thread David Sterba
On Thu, May 17, 2012 at 08:08:08PM +0800, Liu Bo wrote: --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1303,6 +1303,13 @@ static noinline int btrfs_ioctl_resize(struct btrfs_root *root, ret = -EINVAL; goto out_free; } + if (device-fs_devices

Re: Subdirectory creation on snapshot

2012-05-18 Thread David Sterba
On Mon, May 14, 2012 at 10:11:01AM -0700, Brendan Smithyman wrote: The disks that *are* still showing the subdirectory creation issue were both converted from ext4 (using old tools). So perhaps that's a direction to explore. Yeah, thanks for the hint. david -- To unsubscribe from this list:

Re: [PATCH 2/4] Btrfs: fix deadlock on sb-s_umount when doing umount

2012-05-22 Thread David Sterba
On Wed, May 09, 2012 at 11:24:28AM +0800, Miao Xie wrote: Did you apply the trylock patchs I sent before? 20120429 [PATCH 1/2] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them 20120429 [PATCH 2/2] Btrfs: flush all the dirty pages if try_to_writeback_inodes_sb_nr() fails

Re: Could btrfs-restore be extended to also restore file dates?

2012-05-23 Thread David Sterba
On Tue, May 22, 2012 at 03:42:05PM -0600, Henry Bakker wrote: Any possibility of getting btrfs-restore to also restore the files timestamp? Quick look, yes it is possible and quite straightforward. The function restore.c:copy_file has direct access to the found on-disk inode item and can access

Re: [PATCH v4 2/3] Btrfs: add ioctl to get and reset the device stats

2012-05-23 Thread David Sterba
On Tue, May 22, 2012 at 12:53:48PM +0200, Stefan Behrens wrote: An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ioctl.c | 26

Re: [PATCH] Btrfs: fix the same inode id problem when doing auto defragment

2012-05-24 Thread David Sterba
On Thu, May 24, 2012 at 10:42:19AM +0800, Miao Xie wrote: @@ -87,9 +102,9 @@ static void __btrfs_add_inode_defrag(struct inode *inode, parent = *p; entry = rb_entry(parent, struct inode_defrag, rb_node); - if (defrag-ino entry-ino) + if

Re: [PATCH 1/2] btrfs: Drop unused function btrfs_abort_devices()

2012-05-28 Thread David Sterba
On Fri, May 25, 2012 at 11:10:21AM +0800, Asias He wrote: 1) This function is not used anywhere. This was added in 49b25e0540904be0bf558b84475c69d72e4de66e adding a transaction abort infrastructure. I'm not sure if Jeff had some intentions with it or whether it got obsolete during the patchset

Re: Make existing snapshots read-only?

2012-05-29 Thread David Sterba
On Tue, May 29, 2012 at 08:40:10AM +0800, Li Zefan wrote: Is there any way to mark existing snapshots as read-only? Making new ones read-only is easy enough, but what about existing ones? We have code in the kernel side, so what we need to do is to update btrfs-progs, which is trivial.

Re: [PATCH 1/2] btrfs: Drop unused function btrfs_abort_devices()

2012-06-06 Thread David Sterba
On Wed, Jun 06, 2012 at 10:17:28AM +0800, Asias He wrote: Hello, Jeff This was added in 49b25e0540904be0bf558b84475c69d72e4de66e adding a transaction abort infrastructure. I'm not sure if Jeff had some intentions with it or whether it got obsolete during the patchset long evolution, CCed.

Re: Uncorrectable errors on newly extended volume

2012-06-07 Thread David Sterba
On Fri, Jun 01, 2012 at 11:53:18AM +0300, Randall Mason wrote: sudo /sbin/btrfs scrub status . scrub status for 3a29a904-ad28-4e2a-8e80-df29d8d5fafc         scrub started at Thu May 31 10:15:39 2012 and finished after 27581 seconds         total bytes scrubbed: 1.00TB with 23929636

Re: [PATCH 1/2] Btrfs: use rcu to protect device-name

2012-06-11 Thread David Sterba
On Tue, Jun 05, 2012 at 02:16:32PM -0400, Josef Bacik wrote: Al pointed out that we can just toss out the old name on a device and add a new one arbitrarily, so anybody who uses device-name in printk could possibly use free'd memory. Instead of adding locking around all of this he suggested

Re: Btrfs and data nocow per inode basis

2012-06-12 Thread David Sterba
On Tue, Jun 12, 2012 at 04:44:23PM -0400, Chris Mason wrote: On Tue, Jun 12, 2012 at 01:15:27PM -0600, Ted Ts'o wrote: It appears the NOCOW_FL flag is currently a no-op in the 3.2 kernel? It's not a noop, but it is only setting the NODATACOW flag. It needs to set the nodatasum flag as

Re: [PATCH 1/2] Btrfs: use rcu to protect device-name V2

2012-06-12 Thread David Sterba
On Tue, Jun 12, 2012 at 03:50:41PM -0400, Josef Bacik wrote: +++ b/fs/btrfs/check-integrity.c @@ -93,6 +93,7 @@ #include print-tree.h #include locking.h #include check-integrity.h +#include rcu-string.h #define BTRFSIC_BLOCK_HASHTABLE_SIZE 0x1 #define

Re: Question, Does BTRFS provide a read speed increase with RAID1

2012-06-14 Thread David Sterba
On Thu, Jun 14, 2012 at 11:10:56AM +0200, Arne Jansen wrote: On 14.06.2012 11:08, Jordan Windsor wrote: Hello, I was wondering if I setup a array via BTRFS as RAID1 will I get a read speed increase? (multiplied by the amount of harddrives) Only if you read from multiple processes (or

Re: [PATCH 01/10] Btrfs: remove unused FS_NOCOMP_FL check in setflags and getflags

2012-06-14 Thread David Sterba
On Thu, Jun 14, 2012 at 04:23:17PM +0800, Liu Bo wrote: chattr only uses FS_COMPR_FL to switch on/off the compression flag, so we don't need these FS_NOCOMP_FL checks. Please drop this patch. The FS_NOCOMP_FL has a different meaning, it forces the filesystem to completely avoid compression of

Re: [PATCH 02/10] Btrfs: fix missing inherited flag in rename

2012-06-14 Thread David Sterba
On Thu, Jun 14, 2012 at 04:23:18PM +0800, Liu Bo wrote: When we move a file into a directory with compression flag, we need to inherite BTRFS_INODE_COMPRESS and clear BTRFS_INODE_NOCOMPRESS as well. Right. But if we move a file into a directory without compression flag, we need to clear both

Re: btrfs: filenames collide with snapshot/subvolume names

2012-06-14 Thread David Sterba
On Thu, Jun 14, 2012 at 05:34:29AM +0100, Ben Hutchings wrote: ?? (Giorgos?) reports: Namely, being inside a snapshot directory, I can't create a file/directory with the name of the snapshot directory. For example, inside /mnt/aSnap, I can't create a file named 'aSnap', so

Re: [PATCH 1/2] Btrfs: use rcu to protect device-name V2

2012-06-14 Thread David Sterba
On Wed, Jun 13, 2012 at 09:51:03AM -0400, Josef Bacik wrote: On Wed, Jun 13, 2012 at 03:49:07PM +0200, Stefan Behrens wrote: The last sentence of chapter 2 of Documentation/CodingStyle is quite unambiguous. Here is the full quote of that chapter: Chapter 2: Breaking long

Re: Massive metadata size increase after upgrade from 3.2.18 to 3.4.1

2012-06-14 Thread David Sterba
On Sat, Jun 09, 2012 at 01:38:22AM +0600, Roman Mamedov wrote: Before the upgrade (on 3.2.18): Metadata, DUP: total=9.38GB, used=5.94GB After the FS has been mounted once with 3.4.1: Data: total=3.44TB, used=2.67TB System, DUP: total=8.00MB, used=412.00KB System: total=4.00MB,

Re: [PATCH] Btrfs: add nocompress mount option

2012-06-15 Thread David Sterba
On Fri, Jun 15, 2012 at 12:56:49PM +0300, Andrei Popa wrote: In btrfs if we mount with compress we have no way to disable compressing by remounting (mount -o remount /mnt/btrfs), only by unmounting and mounting without compress. This patch adds nocompress mount option which can be used to

Re: [PATCH] Btrfs: Fix NOCOW file attribute

2012-06-18 Thread David Sterba
On Sat, Jun 16, 2012 at 03:37:12PM +0300, Andrei Popa wrote: Adds BTRFS_INODE_NODATASUM to inode flags when setting NOCOW for a file (chattr +C file). In btrfs, NOCOW implies NODATASUM and without setting NODATASUM, btrfs doesn't honour correctly the NOCOW attribute. Signed-off-by: Andrei

Re: [PATCH] Btrfs: add nocompress mount option

2012-06-18 Thread David Sterba
On Fri, Jun 15, 2012 at 06:56:35PM +0200, Goffredo Baroncelli wrote: On 06/15/2012 12:50 PM, David Sterba wrote: I prefer this over adding an extra option to disable. This way there's no confusion if the compression is on or off. mount -o compress,nocompress /dev /mnt The confusion

[PATCH] btrfs: join DEV_STATS ioctls to one

2012-06-22 Thread David Sterba
Hi Chris, please consider this patch for 3.5-rc before it goes final. Thanks. From: David Sterba dste...@suse.cz Commit c11d2c236cc260b36 (Btrfs: add ioctl to get and reset the device stats) introduced two ioctls doing almost the same thing distinguished by just the ioctl number which encodes

Re: [PATCH] btrfs: join DEV_STATS ioctls to one

2012-06-22 Thread David Sterba
On Fri, Jun 22, 2012 at 06:26:44PM +0200, Stefan Behrens wrote: I still do not understand your reason and the benefit of your change. The reset command and the read command are two completely different operations. Therefore I assigned two different ioctl commands. Then you can use strace to

Re: [PATCH] Btrfs: do not ignore errors from btrfs_cleanup_fs_roots() when mounting

2012-06-25 Thread David Sterba
On Fri, Jun 22, 2012 at 09:14:13PM +0300, Ilya Dryomov wrote: There used to be a BUG_ON(ret) there before EH patch (79787eaa) went in. Bail out with EINVAL. Cc: David Sterba dste...@suse.cz Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/disk-io.c |4 ++-- 1 files changed

Re: [PATCH 0/5] btrfs: lz4/lz4hc compression

2012-06-25 Thread David Sterba
On Sat, Jun 23, 2012 at 04:05:43AM -0400, Andrew Mahone wrote: A large portion of the work was done by Dave Sterba, but in flattening the commits attribution has been lost. My contribution has been in debugging some of the cases in which it could crash or produce incorrect data, and cleaning

Re: 3.5-rc4: BTRFS unmountable after hard lockup

2012-06-25 Thread David Sterba
On Mon, Jun 25, 2012 at 08:29:34PM +0200, Martin Steigerwald wrote: I got a X server / drm related crash or hard lockup. After I rebooted I tried to mount the BTRFS on my esata disk. It has big metadata (mkfs.btrfs -l 32768 -n 32768). I got: [ 43.764274] ata5: exception Emask 0x10

Re: how to cleanup old superblock

2012-06-25 Thread David Sterba
On Mon, Jun 25, 2012 at 11:54:50PM +0400, Dmitry MiksIr wrote: Hello! Long time ago I created btrfs on /dev/sda After some changes btrfs moved to /dev/sda1 (well, to md, and sda1 is part of md). As result, btrfs fi show show me 2 filesystems: new one and old one. Probably I need to do some

Re: [PATCH] Btrfs: fix wrong check during log recovery

2012-06-26 Thread David Sterba
of a wrong check for the flags. Right. I looked into the original commit 8a35d95ff4680a45, this was the only case where the conversion to the atomics was reversed. Thanks for the quick fix! Patch should go to 3.5-rc Signed-off-by: Liu Bo liubo2...@cn.fujitsu.com Reviewed-by: David Sterba dste

Re: how to cleanup old superblock

2012-06-26 Thread David Sterba
On Tue, Jun 26, 2012 at 10:53:24AM +0200, Xavier Nicollet wrote: Le 26 June 2012 ? 00:49, David Sterba a écrit: On Mon, Jun 25, 2012 at 11:54:50PM +0400, Dmitry MiksIr wrote: Hello! Long time ago I created btrfs on /dev/sda After some changes btrfs moved to /dev/sda1 (well, to md

Re: [PATCH] Btrfs: use _IOR for BTRFS_IOC_SUBVOL_GETFLAGS

2012-06-26 Thread David Sterba
', so _IOR. I hope it's yet ok to change it, though it's a user visible change. Signed-off-by: Alexander Block abloc...@googlemail.com Reviewed-by: David Sterba dste...@suse.cz --- fs/btrfs/ioctl.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ioctl.h b

Re: [PATCH] Btrfs: return error of btrfs_update_inode() to caller

2012-06-26 Thread David Sterba
the error (probably ENOSPC). Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Btrfs: check return value of btrfs_set_extent_delalloc()

2012-06-26 Thread David Sterba
On Tue, Jun 26, 2012 at 12:22:10PM +0900, Tsutomu Itoh wrote: btrfs_set_extent_delalloc() has the possibility of returning the error. So I add the code in which the return value of btrfs_set_extent_delalloc() is checked. The caller is cluster_pages_for_defrag, the only error I see returned via

Re: [PATCH 1/2] Btrfs: restore restriper state on all mounts

2012-06-26 Thread David Sterba
On Fri, Jun 22, 2012 at 09:24:12PM +0300, Ilya Dryomov wrote: Fix a bug that triggered asserts in btrfs_balance() in both normal and resume modes -- restriper state was not properly restored on read-only mounts. This factors out resuming code from btrfs_restore_balance(), which is now also

Re: waiting for deferred cleanup operations

2012-06-27 Thread David Sterba
On Tue, Jun 26, 2012 at 08:55:20PM -0500, David Nicol wrote: I've noticed that the patches I posted here two years ago about an ioctl to allow userspace to wait for deferred ops to complete aren't included in the has all patches posted to mailing list git repo. Is this an oversight or is there

Re: [PATCH v2] Btrfs: allow mount -o remount,compress=no

2012-06-28 Thread David Sterba
On Tue, Jun 26, 2012 at 08:48:37AM +0200, Arnd Hannemann wrote: How show should we proceed to get above mentioned patch (or the similar patch from Andrei Popa) merged? Josef picked the patch into btrfs-next, I see not problem to include it in next merge window patchset. david -- To

Re: xfstests/224 lockup/slowdown (was: Please hammer my for-linus branch)

2012-07-02 Thread David Sterba
Hi, I'm seeing a machine lockup in xfstests/224, logs attached. Friday's xfstests round with 3.5-rc4 was ok, all tests passed. The 'dd' processes are in D-state with this stacktraces 5597 pts/0D+ 0:00 dd status=noxfer if=/dev/zero of=/mnt/a2/testfile.8 bs=4k conv=notrunc

Re: xfstests/224 lockup/slowdown (was: Please hammer my for-linus branch)

2012-07-02 Thread David Sterba
On Mon, Jul 02, 2012 at 04:10:52PM +0200, David Sterba wrote: Finishing this report anyway, and will redo the tests again. Looking again into the logs, the first process snapshot (only D-state processes) is much longer than process snapshot of containing all, unfortuntelly I don't have

Re: xfstests/224 lockup/slowdown (was: Please hammer my for-linus branch)

2012-07-02 Thread David Sterba
On Mon, Jul 02, 2012 at 04:34:53PM +0200, David Sterba wrote: Bisection in progress. commit cae76522b19735c576803bec273f49062aa418ab Author: Josef Bacik jba...@fusionio.com Date: Thu Jun 21 14:05:49 2012 -0400 Btrfs: flush delayed inodes if we're short on space Those crazy gentoo

Re: Please hammer my for-linus branch

2012-07-03 Thread David Sterba
On Mon, Jul 02, 2012 at 04:17:37PM -0400, Chris Mason wrote: Ok, I've just rebased for-linus. I've dropped Josef's enospc patch, which should fix the regression Dave hit. JFYI, fixed. No other problems observed so far. david -- To unsubscribe from this list: send the line unsubscribe

Re: BTRFS fsck apparent errors

2012-07-03 Thread David Sterba
On Tue, Jul 03, 2012 at 04:22:08PM +0100, Hugo Mills wrote: Correct, by default it just checks the filesystem. Just to be sure: the filesystems in question weren't mounted, were they? fsck will refuse to run on a mounted filesystem, though in case of a read-only mount it might be useful

Re: BTRFS fsck apparent errors

2012-07-03 Thread David Sterba
On Tue, Jul 03, 2012 at 09:26:41AM -0700, Zach Brown wrote: On 07/03/2012 08:52 AM, David Sterba wrote: --- a/btrfsck.c +++ b/btrfsck.c @@ -3474,6 +3474,7 @@ static struct option long_options[] = { { repair, 0, NULL, 0 }, { init-csum-tree, 0, NULL, 0 }, { init

Re: Transaction commit: none (default)

2014-06-18 Thread David Sterba
On Mon, Jun 16, 2014 at 03:09:53PM +0800, Wang Shilong wrote: 1) Is that expected/normal? It looks kind of spamming/useless to me? 2) If it's useful, what's the use I'm not getting? Addressed a issue that subvolumes reappear after deletetion if poweroff happen.

Re: [PATCH] Fix undefined behavior in radix-tree.c.

2014-06-18 Thread David Sterba
On Wed, Jun 18, 2014 at 03:20:30PM +0900, Satoru Takeuchi wrote: Hi Adam, (2014/06/14 6:18), Adam Buchbinder wrote: When running with UndefinedBehaviorSanitizer, the tests produce the following error: radix-tree.c:836:30: runtime error: shift exponent 18446744073709551613

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

2014-06-18 Thread David Sterba
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 btrfs-mount.* - btrfs.5. sounds ok to

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

2014-06-18 Thread David Sterba
On Fri, Jun 13, 2014 at 10:55:57AM +0800, Qu Wenruo wrote: v3: Don't reparse size twice Better u64 overflow check Thanks. I've tested the limits, overflow checks and negative numbers, works fine. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a

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

2014-06-18 Thread David Sterba
On Wed, Jun 04, 2014 at 04:43:11PM -0400, Jeff Mahoney wrote: --- a/utils.c +++ b/utils.c @@ -987,6 +987,63 @@ static int blk_file_in_dev_list(struct b } /* + * Resolve a pathname to a device mapper node to /dev/mapper/name + * Returns NULL on invalid input or malloc failure; Other

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

2014-06-18 Thread David Sterba
On Wed, Jun 18, 2014 at 09:59:50PM +0100, WorMzy Tykashi wrote: I think you forgot to apply the patch that adds Documentation/btrfs-mount.5.txt before you tagged integration-20140618, man5 (and consequently Documentation) can't be made without it, causing a failed build. You're right, sorry.

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

2014-06-19 Thread David Sterba
On Thu, Jun 19, 2014 at 08:43:36AM +0100, WorMzy Tykashi wrote: You're right, sorry. The file was not added after a conflict with git-am and I did not check afterwards. Local build test passed. Updated integration pushed, though it's a bit reduced. The 'next' sub-branch rebase had some

Re: [PATCH] Fix undefined behavior in radix-tree.c.

2014-06-19 Thread David Sterba
On Thu, Jun 19, 2014 at 10:10:55AM +0900, Satoru Takeuchi wrote: It's fixed at 430d275a399. === commit 430d275a399175c7c0673459738979287ec1fd22 Author: Peter Lund fire...@vax64.dk Date: Tue Oct 16 23:29:35 2007

Re: [PATCH 0/6 v2] update sysfs per btrfs device operations

2014-06-20 Thread David Sterba
Hi Chris, any reason why the patches 1-5 were not added to 3.16 queue? On Tue, Jun 03, 2014 at 11:35:58AM +0800, Anand Jain wrote: btrfs: rename add_device_membership to btrfs_kobj_add_device btrfs: dev delete should remove sysfs entry btrfs: dev add should add its sysfs entry btrfs:

[PULL] [PATCH 0/2] Minor fixups from 3.16-rc1

2014-06-20 Thread David Sterba
Hi Chris, two minor fixups for patches merged in rc1 You can also pull that from git://repo.or.cz/linux-2.6/btrfs-unstable.git for-chris/3.16-rc2 with top commit b934864cc8b08eb358748b06468b9cca64026c1e, based on current for-linus 8408c716d7a4ddd5954ce33f53a7d3cd2876cf65 Thanks. David Sterba

[PATCH 1/2] btrfs: remove stale comment from btrfs_flush_all_pending_stuffs

2014-06-20 Thread David Sterba
Commit fcebe4562dec83b3f8d3088d77584727b09130b2 (Btrfs: rework qgroup accounting) removed the qgroup accounting after delayed refs. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/transaction.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/fs/btrfs

[PATCH 2/2] btrfs: use E2BIG instead of EIO if compression does not help

2014-06-20 Thread David Sterba
Return codes got updated in 60e1975acb48fc3d74a3422b21dde74c977ac3d5 (btrfs: return errno instead of -1 from compression) lzo wrapper returns E2BIG in this case, do the same for zlib. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/zlib.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH 1/8] btrfs: remove obsolete comment in btrfs_clean_one_deleted_snapshot

2014-06-20 Thread David Sterba
The comment applied when there was a BUG_ON. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/transaction.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 511839c04f11..da77045785dc 100644 --- a/fs/btrfs

[PULL] [PATCH 0/8] Cleanups, 3.16 or later

2014-06-20 Thread David Sterba
. David Sterba (8): btrfs: remove obsolete comment in btrfs_clean_one_deleted_snapshot btrfs: clenaup: don't call btrfs_release_path before free_path btrfs: cleanup ino cache members of btrfs_root btrfs: make close_ctree return void btrfs: kill the key type accessor helpers btrfs: use

[PATCH 2/8] btrfs: clenaup: don't call btrfs_release_path before free_path

2014-06-20 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/relocation.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 65245a07275b..b3329ad34522 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -4096,7

[PATCH 4/8] btrfs: make close_ctree return void

2014-06-20 Thread David Sterba
There's no user of the return value and we can get rid of the comment in put_super. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/disk-io.c |4 +--- fs/btrfs/disk-io.h |2 +- fs/btrfs/super.c |8 +--- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/fs

[PATCH 6/8] btrfs: use nodesize everywhere, kill leafsize

2014-06-20 Thread David Sterba
23112 898770 db6d2 btrfs.ko.after Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/backref.c |8 ++-- fs/btrfs/check-integrity.c | 13 fs/btrfs/ctree.c | 18 +- fs/btrfs/ctree.h | 21 ++-- fs/btrfs/disk-io.c | 74

[PATCH 3/8] btrfs: cleanup ino cache members of btrfs_root

2014-06-20 Thread David Sterba
The naming is confusing, generic yet used for a specific cache. Add a prefix 'ino_' or rename appropriately. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ctree.h| 10 +++--- fs/btrfs/disk-io.c |6 ++-- fs/btrfs/free-space-cache.c | 14 fs/btrfs

[PATCH 7/8] btrfs: clean away stripe_align helper

2014-06-20 Thread David Sterba
Only wraps the ALIGN macro. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/extent-tree.c | 11 +-- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 177a544630ff..1cfc12f075a3 100644 --- a/fs/btrfs/extent

[PATCH 8/8] btrfs: use DIV_ROUND_UP instead of open-coded variants

2014-06-20 Thread David Sterba
The form (value + PAGE_CACHE_SIZE - 1) PAGE_CACHE_SHIFT is equivalent to (value + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE The rest is a simple subsitution, no difference in the generated assembly code. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/check-integrity.c |3

[PATCH 5/8] btrfs: kill the key type accessor helpers

2014-06-20 Thread David Sterba
btrfs_set_key_type and btrfs_key_type are used inconsistently along with open coded variants. Other members of btrfs_key are accessed directly without any helpers anyway. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/backref.c |4 ++-- fs/btrfs/delayed-inode.c |8

Re: btrfs: qgroup: account shared subtrees during snapshot delete

2014-06-20 Thread David Sterba
On Thu, Jun 19, 2014 at 04:17:25PM -0700, Josef Bacik wrote: We don't pay attention to the return value, we should probably abort the transaction if there is a problem. Abort or log an error and continue? I ask because technically we could continue with the subvolume drop but obviously

[PATCH] btrfs: adjust message levels in open_ctree

2014-06-20 Thread David Sterba
The level should express the severity, so anything that leads to a failed mount gets ERROR level, if it's possible continue then WARNING, and informative messages are INFO. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/disk-io.c | 32 1 file changed

<    6   7   8   9   10   11   12   13   14   15   >