Re: [PATCH 13/16] btrfs-progs: check btrfs_scan_one_device in btrfs_scan_lblkid()

2013-11-07 Thread Anand Jain
reviewed-by: Anand Jain anand.j...@oracle.com On 11/07/2013 07:15 AM, Eric Sandeen wrote: Even if it's definitely btrfs at this point, btrfs_scan_one_device could fail for other reasons. Check the return value, warn if it fails, and skip the device register. Resolves-Coverity-CID: 1125925

Re: Fwd: unable to delete files after kernel upgrade from 3.8.10 to 3.12

2013-11-07 Thread Stefan Behrens
On Wed, 6 Nov 2013 21:53:25 +, Bartosz Kulicki wrote: As per subject. Seems UUID tree creation failed after upgrade. I could not mount filesystem under 3.12. Going back to 3.8.10 allowed me to mount fs but I could no longer perform any deletes, writes etc. I've opened a bug report here.

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread Stefan Behrens
On Thu, 7 Nov 2013 13:51:52 +0800, Qu Wenruo wrote: Use kernel workqueue to implement a new btrfs_workqueue_struct, which has the ordering execution feature like the btrfs_worker. The func is executed in a concurrency way, and the ordred_func/ordered_free is executed in the sequence them are

[PATCH 3/3] btrfs-progs: lblkid wouldn't find non mapper path input v3

2013-11-07 Thread Anand Jain
A new test case when disk is unmounted and if the non mapper disk path is given as the argument to the btrfs filesystem show arg we still need this to work but lblkid will pull only mapper disks, it won't match. So this will normalize the input to find btrfs by fsid and pass it to the search. v2:

Re: [PATCH 2/4 v2] btrfs-progs: mechanism to fetch fsinfo from btrfs-control

2013-11-07 Thread Anand Jain
Thanks sent out v3. On 11/07/13 04:13 AM, Josef Bacik wrote: On Mon, Nov 04, 2013 at 11:45:43AM +0800, Anand Jain wrote: need fsinfo from btrfs-control that is when mount path is not known. current method of going through each mount points isn't efficient, and multiple subvol of a fsid could

[PATCH 2/3] btrfs-progs: fs show should handle if subvol(s) mounted v3

2013-11-07 Thread Anand Jain
as of now with out this patch user would see fsinfo per btrfs mount path but which mean multiple entry if more than one subvol is mounted of the same fsid. so this patch will handle that nicely. v3: accepts Josef suggested and fix git screwup v2: accepts Zach suggested Signed-off-by: Anand Jain

[PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v3

2013-11-07 Thread Anand Jain
need fsinfo from btrfs-control that is when mount path is not known. current method of going through each mount points isn't efficient, and multiple subvol of a fsid could be mounted means extra logic to handle that. Further this will help to revamp check_mounted() (planned) check_mounted is

Re: [PATCH 4/4] btrfs-progs: lblkid wouldn't find non mapper path input

2013-11-07 Thread Anand Jain
Done. On 11/07/13 04:20 AM, Josef Bacik wrote: On Mon, Nov 04, 2013 at 11:45:45AM +0800, Anand Jain wrote: A new test case when disk is unmounted and if the non mapper disk path is given as the argument to the btrfs filesystem showarg we still need this to work but lblkid will pull only

Re: [PATCH 3/4 v2] btrfs-progs: fs show should handle if subvol(s) mounted

2013-11-07 Thread Anand Jain
Thanks sent out v3 On 11/07/13 04:19 AM, Josef Bacik wrote: On Mon, Nov 04, 2013 at 11:45:44AM +0800, Anand Jain wrote: as of now with out this patch user would see fsinfo per btrfs mount path but which mean multiple entry if more than one subvol is mounted of the same fsid. so this patch

[PATCH 3/3] btrfs-progs: lblkid wouldn't find non mapper path input v3

2013-11-07 Thread Anand Jain
A new test case when disk is unmounted and if the non mapper disk path is given as the argument to the btrfs filesystem show arg we still need this to work but lblkid will pull only mapper disks, it won't match. So this will normalize the input to find btrfs by fsid and pass it to the search. v3:

[PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v3

2013-11-07 Thread Anand Jain
need fsinfo from btrfs-control that is when mount path is not known. current method of going through each mount points isn't efficient, and multiple subvol of a fsid could be mounted means extra logic to handle that. Further this will help to revamp check_mounted() (planned) check_mounted is

Re: [PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v3

2013-11-07 Thread Stefan Behrens
On Thu, 7 Nov 2013 18:01:41 +0800, Anand Jain wrote: + *out_fslist = malloc(sz); + if (*out_fslist == NULL) { + ret = -ENOMEM; + goto out; + } + memcpy(*out_fslist, fslist, sz); + ret = 0; +out: + free(fsargs_saved); + close(fd); +

[PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v4

2013-11-07 Thread Anand Jain
need fsinfo from btrfs-control that is when mount path is not known. current method of going through each mount points isn't efficient, and multiple subvol of a fsid could be mounted means extra logic to handle that. Further this will help to revamp check_mounted() (planned) check_mounted is

Re: [PATCH 1/3] btrfs-progs: mechanism to fetch fsinfo from btrfs-control v3

2013-11-07 Thread Anand Jain
On 11/07/2013 06:04 PM, Stefan Behrens wrote: On Thu, 7 Nov 2013 18:01:41 +0800, Anand Jain wrote: + *out_fslist = malloc(sz); + if (*out_fslist == NULL) { + ret = -ENOMEM; + goto out; + } + memcpy(*out_fslist, fslist, sz); + ret = 0;

[PATCH v2] Btrfs: don't wait for ordered data outside desired range

2013-11-07 Thread Filipe David Borba Manana
In btrfs_wait_ordered_range(), if we found an extent to the left of the start of our desired wait range and the last byte of that extent is 1 less than the desired range's start, we would would wait for the IO completion of that extent and all other extents to the left of that extent,

Re: [PATCH 1/9] block: Convert various code to bio_for_each_segment()

2013-11-07 Thread Jan Kara
On Mon 04-11-13 15:36:19, Kent Overstreet wrote: With immutable biovecs we don't want code accessing bi_io_vec directly - the uses this patch changes weren't incorrect since they all own the bio, but it makes the code harder to audit for no good reason - also, this will help with multipage

Re: Fwd: unable to delete files after kernel upgrade from 3.8.10 to 3.12

2013-11-07 Thread Bartosz Kulicki
Hi Stefan, Yes, I realise that. As I pointed out in bug report I have tried workarounds suggested in wiki and more. To be precise: partial balancing didn't work (completed without error but no change), balacing fs failed with ENOSPC, clobbering a file didn't work (ENOSPC), btrfs-zero-log

Re: Fwd: unable to delete files after kernel upgrade from 3.8.10 to 3.12

2013-11-07 Thread Bartosz Kulicki
FWIW - just before nuking the fs I have added a 3GB loopback device to btrfs. This restored ability to delete the files but I could not remove the loopback after deleting some large files (if I remember correctly error I got was block device required) cheers, Bart -- To unsubscribe from this

Re: [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21

2013-11-07 Thread Liu Bo
On Wed, Nov 06, 2013 at 02:24:25PM +0100, David Sterba wrote: On Wed, Nov 06, 2013 at 10:42:35AM +0100, Stefan Behrens wrote: Sharing the ioctl value seems to have happened by mistake and is uncommon, but IMHO now it's too late to change this interface just for esthetical reasons.

Re: Fwd: unable to delete files after kernel upgrade from 3.8.10 to 3.12

2013-11-07 Thread Duncan
Bartosz Kulicki posted on Thu, 07 Nov 2013 11:43:15 + as excerpted: FWIW - just before nuking the fs I have added a 3GB loopback device to btrfs. This restored ability to delete the files but I could not remove the loopback after deleting some large files (if I remember correctly error

How to fix/remove csum failed ino error

2013-11-07 Thread Anatol Pomozov
Hi I use Linux Arch, kernel 3.11.6. Recently I had a disk crash and number of my files got corrupted. To avoid this situation again I added more disks I trying to convert the data to raid1: # btrfs balance start -dconvert=raid1 -mconvert=raid1 / But unfortunately it fails with IO erro. In

Warning Your Mailbox Has Exceeded Quota Limit

2013-11-07 Thread Kell, Todd
Dear user, Your mailbox has Exceeded the quota limit set by the administrator, you will not be able to send or receive mail until you revalidates your account. Please click the link below or copy paste to your browser to validate your mailbox. http://tinylink.net/quotalimit Failure to do

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread David Sterba
On Thu, Nov 07, 2013 at 10:33:32AM +0100, Stefan Behrens wrote: +struct btrfs_work_struct { + void (*func)(struct btrfs_work_struct *arg); + void (*ordered_func)(struct btrfs_work_struct *arg); + void (*ordered_free)(struct btrfs_work_struct *arg); + + /* Don't touch things

Re: [PATCH v3 03/17] btrfs: Add high priority workqueue support for btrfs_workqueue_struct

2013-11-07 Thread David Sterba
On Thu, Nov 07, 2013 at 01:51:53PM +0800, Qu Wenruo wrote: @@ -753,6 +754,19 @@ struct btrfs_workqueue_struct *btrfs_alloc_workqueue(char *name, } } + if (high_name) { + ret-high_wq = alloc_workqueue(high_name, +

Re: How to fix/remove csum failed ino error

2013-11-07 Thread Frank Holton
Hey Anatol, I just checked and on my filesystem inode number 362 corresponds to part of the free space cache. You can check this yourself by running (as root) btrfs-debug-tree /dev/sdb | grep (362 -A 3 -B 1 where /dev/sdb is one of the devices from your filesystem. It printed the following

Re: [PATCH v3 01/17] btrfs: Cleanup the unused struct async_sched.

2013-11-07 Thread Josef Bacik
On Thu, Nov 07, 2013 at 01:51:51PM +0800, Qu Wenruo wrote: The struct async_sched is not used by any codes and can be removed. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com Reviewed-by: Josef Bacik jba...@fusionio.com Thanks, Josef -- To unsubscribe from this list: send the line

Re: [PATCH v3 00/17] Replace btrfs_workers with kernel workqueue based btrfs_workqueue_struct

2013-11-07 Thread David Sterba
On Thu, Nov 07, 2013 at 01:51:50PM +0800, Qu Wenruo wrote: Qu Wenruo (17): btrfs: Cleanup the unused struct async_sched. btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue btrfs: Add high priority workqueue support for btrfs_workqueue_struct

Re: [PATCH v3 00/17] Replace btrfs_workers with kernel workqueue based btrfs_workqueue_struct

2013-11-07 Thread Chris Mason
Quoting Qu Wenruo (2013-11-07 00:51:50) Add a new btrfs_workqueue_struct which use kernel workqueue to implement most of the original btrfs_workers, to replace btrfs_workers. With this patchset, redundant workqueue codes are replaced with kernel workqueue infrastructure, which not only

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread Josef Bacik
On Thu, Nov 07, 2013 at 01:51:52PM +0800, Qu Wenruo wrote: Use kernel workqueue to implement a new btrfs_workqueue_struct, which has the ordering execution feature like the btrfs_worker. The func is executed in a concurrency way, and the ordred_func/ordered_free is executed in the sequence

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread Josef Bacik
On Thu, Nov 07, 2013 at 01:08:26PM -0500, Josef Bacik wrote: On Thu, Nov 07, 2013 at 01:51:52PM +0800, Qu Wenruo wrote: Use kernel workqueue to implement a new btrfs_workqueue_struct, which has the ordering execution feature like the btrfs_worker. The func is executed in a concurrency

Re: btrfsck errors is it save to fix?

2013-11-07 Thread Hendrik Friedel
Hello again, can someone please help me on this? Regards, Hendrik Am 06.11.2013 07:45, schrieb Hendrik Friedel: Hello, sorry, I was totally unaware still being on 3.11rc2. I re-ran btrfsck with the same result: ./btrfs-progs/btrfsck /dev/sdc1 Checking filesystem on /dev/sdc1 UUID:

Re: [PATCH 1/9] block: Convert various code to bio_for_each_segment()

2013-11-07 Thread Kent Overstreet
On Thu, Nov 07, 2013 at 12:26:30PM +0100, Jan Kara wrote: On Mon 04-11-13 15:36:19, Kent Overstreet wrote: With immutable biovecs we don't want code accessing bi_io_vec directly - the uses this patch changes weren't incorrect since they all own the bio, but it makes the code harder to audit

Re: kernel BUG at fs/btrfs/ctree.c:2964!

2013-11-07 Thread Ilari Stenroth
On 2.11.2013 3.34, Josef Bacik wrote: On this box can you run gdb btrfs.ko list *(__btrfs_drop_extents+0x59d) I want to know where exactly this is coming from so I can start trying to figure out how it's happening. Thanks, Hi, I've got the same issue. Btrfs FS crashes on my box

Question about btrfs as root filesystem

2013-11-07 Thread Michael Göhler
Hi, I'm a contributor of the Arch Linux package mkinitcpio-btrfs [1]. The goal of this hook is to provide Btrfs rollback support for root filesystems directly from initrd. Technically we are using a subvolume to store the root filesystem. The user can snapshot it entirely and boot from this

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread Qu Wenruo
On thu, 7 Nov 2013 17:05:29 +0100, David Sterba wrote: On Thu, Nov 07, 2013 at 10:33:32AM +0100, Stefan Behrens wrote: +struct btrfs_work_struct { + void (*func)(struct btrfs_work_struct *arg); + void (*ordered_func)(struct btrfs_work_struct *arg); + void

Re: [OPW kernel] [PATCH v2] btrfs:check-integrity.c: replace kmalloc with kmalloc_array and kzalloc with kzalloc_array.

2013-11-07 Thread Rusty Russell
Himangi Saraogi himangi...@gmail.com writes: This patch replaces kmalloc(size * nr, ) with kmalloc_array(nr, size) as kmalloc_array() is preferred because it can check that the calculation doesn't wrap and won't return a smaller allocation. Also kzalloc(size * nr) was replaced with

Re: [PATCH v3 03/17] btrfs: Add high priority workqueue support for btrfs_workqueue_struct

2013-11-07 Thread Qu Wenruo
On Thu, 7 Nov 2013 17:41:34 +0100, David Sterba wrote: On Thu, Nov 07, 2013 at 01:51:53PM +0800, Qu Wenruo wrote: @@ -753,6 +754,19 @@ struct btrfs_workqueue_struct *btrfs_alloc_workqueue(char *name, } } + if (high_name) { + ret-high_wq =

Re: [PATCH v3 00/17] Replace btrfs_workers with kernel workqueue based btrfs_workqueue_struct

2013-11-07 Thread Qu Wenruo
On thu, 7 Nov 2013 18:52:14 +0100, David Sterba wrote: On Thu, Nov 07, 2013 at 01:51:50PM +0800, Qu Wenruo wrote: Qu Wenruo (17): btrfs: Cleanup the unused struct async_sched. btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue btrfs: Add

Re: [PATCH v3 00/17] Replace btrfs_workers with kernel workqueue based btrfs_workqueue_struct

2013-11-07 Thread Qu Wenruo
On Thu, 7 Nov 2013 12:54:56 -0500, Chris Mason wrote: Quoting Qu Wenruo (2013-11-07 00:51:50) Add a new btrfs_workqueue_struct which use kernel workqueue to implement most of the original btrfs_workers, to replace btrfs_workers. With this patchset, redundant workqueue codes are replaced with

Re: [PATCH v3 02/17] btrfs: Added btrfs_workqueue_struct implemented ordered execution based on kernel workqueue

2013-11-07 Thread Qu Wenruo
On Thu, 7 Nov 2013 13:09:56 -0500, Josef Bacik wrote: On Thu, Nov 07, 2013 at 01:08:26PM -0500, Josef Bacik wrote: On Thu, Nov 07, 2013 at 01:51:52PM +0800, Qu Wenruo wrote: Use kernel workqueue to implement a new btrfs_workqueue_struct, which has the ordering execution feature like the

Re: Question about btrfs as root filesystem

2013-11-07 Thread Chris Murphy
On Nov 7, 2013, at 4:45 PM, Michael Göhler vi...@myjm.de wrote: The boot subvolume is then set with 'btrfs subvolume set-default' and mounted without subvol/subvolid option by Arch's default mount handler. I'm unconvinced it's a good idea for it to be used behind the scenes for the

Re: How to fix/remove csum failed ino error

2013-11-07 Thread Anatol Pomozov
Hi, Frank Thanks for your answer. On Thu, Nov 7, 2013 at 8:41 AM, Frank Holton fhol...@gmail.com wrote: Hey Anatol, I just checked and on my filesystem inode number 362 corresponds to part of the free space cache. You can check this yourself by running (as root) btrfs-debug-tree /dev/sdb

Re: How to fix/remove csum failed ino error

2013-11-07 Thread Anatol Pomozov
Hi I ran btrfsck hoping that it fix the filesystem so 'balance' would not crash anymore. But btrfsck itself crashed :( # btrfsck --repair /dev/sda3 :( enabling repair mode Checking filesystem on /dev/sda3 UUID: 25e6a6fa-fe1f-4be5-a638-eeac948f8c21 checking extents checking fs roots

Re: How to fix/remove csum failed ino error

2013-11-07 Thread Frank Holton
Hi Anatol, That certainly does not look good, definitely more than just a bad space cache. A this point I would strongly suggest that before you try anything else on the file system that you make sure you have a backup of everything up there. After you have backed up everything a scrub may be

Re: How to fix/remove csum failed ino error

2013-11-07 Thread Chris Murphy
What's the kernel and btrfs progs version? I wish the dmesg errors were more explicit about the nature of checksum errors: do the two metadata checksums mismatch each other (one of them matches with data), or the metadata checksums match each other but mismatch with data? Hopefully I'm