[PATCH] btrfs-progs: add -V description in print_usage

2012-10-16 Thread Wang Sheng-Hui
mkfs supports the option -V/--version. Add its description to print_usage(). Signed-off-by: Wang Sheng-Hui --- mkfs.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/mkfs.c b/mkfs.c index 47f0c9c..2cc6051 100644 --- a/mkfs.c +++ b/mkfs.c @@ -349,6 +349,7 @@ static void p

[PATCH] btrfs: Return EINVAL when length to trim is less than FSB

2012-10-16 Thread Lukas Czerner
Currently if len argument in btrfs_ioctl_fitrim() is smaller than one FSB we will continue and finally return 0 bytes discarded. However if the length to discard is smaller then file system block we should really return EINVAL. Signed-off-by: Lukas Czerner --- fs/btrfs/ioctl.c |3 ++- 1 file

[PATCH] Btrfs: fix deadlock caused by the nested chunk allocation

2012-10-16 Thread Miao Xie
Steps to reproduce: # mkfs.btrfs -m raid1 # btrfstune -S 1 # mount # btrfs device add # mount -o remount,rw # dd if=/dev/zero of=/tmpfile bs=1M count=1 Deadlock happened. It is because of the nested chunk allocation. When we wrote the data into the filesystem, we would allocate the

[PATCH 1/2] Btrfs: fix wrong comment in can_overcommit()

2012-10-16 Thread Miao Xie
The comment is not coincident with the code. Fix it. Signed-off-by: Miao Xie --- fs/btrfs/extent-tree.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 7563db7..2cfcce2 100644 --- a/fs/btrfs/extent-tree.c +++ b/f

[PATCH 2/2] Btrfs: improve the noflush reservation

2012-10-16 Thread Miao Xie
In some places(such as: evicting inode), we just can not flush the reserved space of delalloc, flushing the delayed directory index and delayed inode is OK, but we don't try to flush those things and just go back when there is no enough space to be reserved. This patch fixes this problem. We defin

[PATCH] btrfs-progs: check non-digit character in the size value for mkfs options

2012-10-16 Thread Wang Sheng-Hui
When we run mkfs.btrfs, we can specify the size value for leafsize, etc. Current the limit is 65536, and the lower limit is 4096. Also, the size should be 4096 aligned. When we specify such value, parse_size just check the tailing non-digit character, but doesn't check other characters. For exampl

Free space cache writeback issue

2012-10-16 Thread Jan Schmidt
Hi, I've hit an issue with the free space cache. It looks like we miss writing everything to disk on unmount under rough conditions. Setup: git head cmason/master, /dev/sdv1 is a 55MB partition on an SSD. Run the following script: -- DEV=/dev/sdv1 MP=/mnt/scratch umount $MP mkfs.btrfs -M $DEV m

Re: problems with btrfs send / restore

2012-10-16 Thread Stefan Priebe - Profihost AG
Am 15.10.2012 22:14, schrieb Alex Lyakas: Stefan, the second issue you're seeing was discussed here: http://www.spinics.net/lists/linux-btrfs/msg19672.html You can apply the patch I sent there meanwhile, but as Miao pointed out, I will need to make a better patch (hope will do it soon, together

Re: Can not Mount btrfs No Space left

2012-10-16 Thread Shawn Dakin
Well, I mounted the volume ro and copied that data to another device. Then I cleaned the junk out and then copied the data back to the original device which I had wiped. Total recovery time 4 hours. Thanks for the hint Hugo, I don't know why it never occurred to me to mount it read only. On Mon,

[PATCH] Change the check for PageReadahead into an else-if

2012-10-16 Thread raghu . prabhu13
From: Raghavendra D Prabhu >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces async readahead into its readahead window, so another checking for that again is not required. Signed-off-by: Raghavendra D Prabhu --- fs/btrfs/relocation.c | 10 -- mm/filemap.c

Re: [PATCH v2] Btrfs: extended inode refs support for send mechanism

2012-10-16 Thread Mark Fasheh
On Mon, Oct 15, 2012 at 10:30:45AM +0200, Jan Schmidt wrote: > This adds support for the new extended inode refs to btrfs send. > > Signed-off-by: Jan Schmidt > --- > fs/btrfs/backref.c | 22 - > fs/btrfs/backref.h |4 ++ > fs/btrfs/send.c| 126 > +

filesystem in such a state that btrfsck crashes

2012-10-16 Thread Sami Haahtinen
Hi, A few days ago I started experiencing some major slowdowns in my main btrfs filesystem and when inspecting the errors I noticed an error during balance: btrfs: block rsv returned -28 After a while I started seeing worse and worse problems with the filesystem. Eventually I was forced to rever

Re: [PATCH v2] Btrfs: extended inode refs support for send mechanism

2012-10-16 Thread Chris Mason
On Mon, Oct 15, 2012 at 02:30:45AM -0600, Jan Schmidt wrote: > This adds support for the new extended inode refs to btrfs send. Thanks, pulling this in. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majo

Re: [PATCH] Change the check for PageReadahead into an else-if

2012-10-16 Thread Fengguang Wu
On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabh...@gmail.com wrote: > From: Raghavendra D Prabhu > > >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces > async readahead into its readahead window, so another checking for that again > is > not required. > > Signed

Re: [PATCH] Change the check for PageReadahead into an else-if

2012-10-16 Thread KOSAKI Motohiro
On Tue, Oct 16, 2012 at 10:00 PM, Fengguang Wu wrote: > On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabh...@gmail.com wrote: >> From: Raghavendra D Prabhu >> >> >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces >> async readahead into its readahead window, so anot

Re: [RFC v3 09/13] vfs: add one wq to update map info periodically

2012-10-16 Thread Zhi Yong Wu
On Tue, Oct 16, 2012 at 8:27 AM, Dave Chinner wrote: > On Wed, Oct 10, 2012 at 06:07:31PM +0800, zwu.ker...@gmail.com wrote: >> From: Zhi Yong Wu >> >> Add a per-superblock workqueue and a work_struct >> to run periodic work to update map info on each superblock. >> >> Signed-off-by: Zhi Yong