[PATCH 2/3] Btrfs-progs: add attribute label for subvol and snapshot

2012-11-30 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfslabel.c | 38 ++ btrfslabel.h |4 +++- ctree.h |1 + 3 files changed, 42 insertions(+), 1 deletions(-) diff --git a/btrfslabel.c b/btrfslabel.c

[PATCH 3/3] Btrfs-progs: cmd option to show or set the subvol label

2012-11-30 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-subvolume.c | 37 + man/btrfs.8.in |6 ++ 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index

[PATCH] Btrfs: rename root_times_lock to root_item_lock

2012-12-07 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Originally root_times_lock was introduced as part of send/receive code however newly developed patch to label the subvol reused the same lock, so renaming it for a meaningful name. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/ctree.c

Re: [PATCH] btrfs: Notify udev when removing device

2012-12-07 Thread Anand Jain
It works. Nice fix. Thanks Anand On 12/07/2012 03:25 AM, Lukas Czerner wrote: Currently udev does not know about the device being removed from the file system. This may result in the situation where we're unable to mount the file system by UUID or by LABEL because the by-uuid and by-label

[Bug] Remove and add a mounted device gets a new dev path

2012-12-07 Thread Anand Jain
# mount /dev/sdb /btrfs # echo scsi remove-single-device 1 0 0 0 /proc/scsi/scsi # lsscsi [0:0:0:0]diskATA VBOX HARDDISK1.0 /dev/sda [2:0:0:0]diskATA VBOX HARDDISK1.0 /dev/sdc # btrfs su create /btrfs/sv1 Create subvolume '/btrfs/sv1' ERROR: cannot

[PATCH 0/5] add tree format display for btrfs subvol list subcommand

2012-12-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com This will add new option -x to the btrfs subvol list sub-command to display subvol-snapshot relation in tree format with appropriate indentation. Anand Jain (5): Btrfs-progs: add parent uuid for snapshots Btrfs-progs: maintain similar case in heading

[PATCH 1/5] Btrfs-progs: add parent uuid for snapshots

2012-12-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 32 +++- btrfs-list.h |1 + cmds-subvolume.c |6 +- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/btrfs-list.c b/btrfs

[PATCH 2/5] Btrfs-progs: maintain similar case in heading prefix

2012-12-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com A trivial fix before this patch btrfs su list -qu /btrfs ID 256 gen 35 top level 5 parent UUID - uuid 60e54c4a-8136-3c43-a107-ea42052c6240 path sv1 ID 257 gen 35 top level 5 parent UUID 60e54c4a-8136-3c43-a107-ea42052c6240 uuid fdefa4a9-5b67-4f4c

[PATCH 3/5] Btrfs-progs: Move printing outside of btrfs_list_subvols

2012-12-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com its better to have btrfs_list_subvols just return witout printing so that btrfs_list_subvols can be reused. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 28 ++-- btrfs-list.h |2 +- cmds

[PATCH 4/5] Btrfs-progs: make provision to print subvol list tree format

2012-12-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Currently we have default (name value) and table format to list the subvol. This patch will help to accommodate the enhancement to provide the tree display for the subvol-snapshot list. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c

[PATCH 5/5] Btrfs-progs: Add -x option to btrfs subvol list to display snapshots in tree format

2012-12-15 Thread Anand jain
From: Anand Jain anand.j...@oracle.com This will add new option -x to the btrfs subvol list sub-command to display the snapshots under its parent subvol with appropriate indentation. Signed-off-by: Anand Jain anand.j...@oracle.com --- btrfs-list.c | 135

Re: subvolume show

2012-12-17 Thread Anand Jain
This looks like a useful capability. I was trying to find out what the UUID was for a newly created subvolume and have not found out how to do that. btrfs subvol list -u /mnt should help ? btrfs subvol show subvol is quite useful indeed we should consider to have it in git. -Anand On

Re: revert to static snapshot on reboot

2012-01-10 Thread Anand Jain
Upcoming btrfs autosnap feature might help your problem-solution. But the main part in your case which is to replace the root with its snapshot is something beyond the scope of autosnap project. What is being developed is a set of btrfs-prog sub-command to create and manage snapshots

Re: can't access diagrams on wiki

2012-01-24 Thread Anand Jain
The wiki on kernel.org is in read-only mode [1] http://btrfs.ipv5.de/ Is wiki still in read only mode? I am able to login, but there isn't any link to create new page ? thanks, Anand -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: can't access diagrams on wiki

2012-01-26 Thread Anand Jain
: On 25.01.2012 03:37, Anand Jain wrote: The wiki on kernel.org is in read-only mode [1] http://btrfs.ipv5.de/ Is wiki still in read only mode? I am able to login, but there isn't any link to create new page ? You mean the wiki mentioned above? You have to confirm your email address

[PATCH V2] Btrfs-progs: add \btrfs subvolume get-default\ subcommand

2012-02-14 Thread Anand Jain
Hi Xin / Hugo, I am referring to git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git has miss match parameter list for list_subvols -- # cd btrfs-progs # egrep list_subvols * btrfs_cmds.c: ret = list_subvols(fd, print_parent, 0); btrfs_cmds.c: ret =

Re: [RFC] btrfs auto snapshot

2012-02-23 Thread Anand Jain
On Thursday 23,February,2012 06:37 PM, Hubert Kario wrote: On Wednesday 17 of August 2011 10:15:46 Anand Jain wrote: btrfs auto snapshot feature will include: Initially: snip - snapshot destination will be subvol/.btrfs/snapshot@time and snapshot/.btrfs/snapshot@time

Re: git resources

2012-02-23 Thread Anand Jain
(When we have this I shall update the btrfs wiki) As promised an article was posted here sometime back. Writing patch for btrfs http://btrfs.ipv5.de/index.php?title=Writing_patch_for_btrfs It was long waiting in my mail draft as kernel.org was down sorry for the delay. -Anand --

Re: [RFC] btrfs auto snapshot

2012-02-23 Thread Anand Jain
Thanks for the inputs. there is no clear winner as of now. Let me keep the uuid for now, if more sysadmin feel timestamp is better we could device it that way. -Anand -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

Re: [PATCH] [RFC] Add btrfs autosnap feature

2012-02-28 Thread Anand Jain
Hi, This patch added autosnap feature for the btrfs-progs. The link below provides autosnap guide.. http://btrfs.ipv5.de/index.php?title=Autosnap:_Configure_your_btrfs_to_create_and_manage_snapshots_automatically_based_on_events_or_at_a_regular_frequency Further there is timeslider, a

Re: [PATCH] [RFC] Add btrfs autosnap feature

2012-03-04 Thread Anand Jain
(notably the direct modification of crontab files, which is considered to be an internal detail if I understand correctly, and I'm fairly certain is broken as written), I did came across that point of view however, using crontab cli in the program wasn't convincing either, (library call

Re: [PATCH] [RFC] Add btrfs autosnap feature

2012-03-05 Thread Anand Jain
Prior to making a new snapshot, grab the (stored) transid of the previous snapshot, and check if any files have been modified in the source since that transid: btrfs sub find ${source} ${previous_transid}. If nothing is returned, then you don't have to bother making the snapshot at all,

[PATCH 1/2] Make find_updated_files to return value instead of printing

2012-03-05 Thread Anand jain
From: Anand Jain anand.j...@oracle.com This patch made the function find_updated_files to update the transid in a pointer instead of printing it on the stdout. This is needed by the autosnap and anyother program which may want to find the current transid. Note that when last_gen 3rd parameter

[PATCH 2/2] Use transaction id to determin if there is any change in the subvol

2012-03-05 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Moved from hash method of determining the FS changes to the transaction record id method Signed-off-by: Anand Jain anand.j...@oracle.com --- autosnap.c | 106 ++-- autosnap.h |4 +-- 2 files

[PATCH 2/2 v2] Use transaction id to determin if there is any change in the subvol

2012-03-06 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Moved from hash method of determining the FS changes to the transaction record id method Signed-off-by: Anand Jain anand.j...@oracle.com --- Makefile |2 +- autosnap.c | 176 ++-- autosnap.h

Re: kernel BUG at fs/btrfs/transaction.c:1337!

2012-03-12 Thread Anand Jain
could you also post few lines of dmesg logged _before_ the below logs. Thanks, -Anand On Saturday 10,March,2012 06:26 PM, qasdfgtyuiop wrote: [11558.527680] [ cut here ] [11558.527708] kernel BUG at fs/btrfs/transaction.c:1337! [11558.527730] invalid opcode:

Re: kernel BUG at fs/btrfs/transaction.c:1337!

2012-03-13 Thread Anand Jain
These logs doesn't have the traces of the below BUG_ON(). stack as in the dmesg below has 'btrfs_congested_fn' which generally notifies block-device near Q full condition. we would need logs to confirm anything further. was there a kernel dump generated when BUG_ON was called? that should

Re: kernel BUG at fs/btrfs/transaction.c:1337!

2012-03-13 Thread Anand Jain
$sudo btrfsck /home/not-a-user/broken-btrfs.img bad block 29933568 bad block 44224512 parent transid verify failed on 54566912 wanted 3532 found 3475 These aren't related to the original problem as in the subject. But it could be the panic's aftermath effect if IOs didn't made into the

Synchronous snapshot delete

2012-03-20 Thread Anand Jain
Hi Team, Could you let me know if you are working on.. Synchronous snapshot delete (or similar) few requested for this feature, just wanted to know if anyone has picked up this and is working on it. Thanks, Anand -- To unsubscribe from this list: send the line unsubscribe

Re: Kernel bug in BTRFS (kernel 3.3.0)

2012-04-17 Thread anand jain
Hi Olivier [370517.204350] btrfs: 1 errors while writing supers [370517.204376] [ cut here ] [370517.204391] kernel BUG at fs/btrfs/disk-io.c:2880! --- if (total_errors max_errors) { printk(KERN_ERR btrfs: %d errors while writing supers\n,

Re: ran cppcheck and going to make cosmetic changes--where do I submit code?

2012-05-04 Thread Anand Jain
where do I submit the code when I'm done? P.S. This is my first kernel project, so I'm going to need some direction. wiki page 'Writing patch for btrfs' has this info http://btrfs.ipv5.de/index.php?title=Writing_patch_for_btrfs good luck. -Anand -- To unsubscribe from this list: send

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

2012-06-13 Thread Anand Jain
Did you try balance ? (also there is a balance option to pick the least utilized metadata chunks). in long run when you have the understanding of your files and sizes tuning using mount option metadata_ratio might help. but not sure how the metadata expanded to 84.38G was there any

[Report] corrupted root csum tree result in segfault.

2012-06-26 Thread Anand Jain
# mkfs.btrfs /dev/sdd btrfs-debug-tree -R /dev/sdd | egrep checksum :: checksum tree key (CSUM_TREE ROOT_ITEM 0) 29376512 level 0 # btrfs-corrupt-block -l 29376512 /dev/sdd mirror 1 logical 29376512 physical 37765120 device /dev/sdd corrupting 29376512 copy 1 mirror 2 logical 29376512

btrfs-debug-tree -e

2012-06-28 Thread Anand Jain
Hi, Looks like commit fcdc0929c6ea051dad59818210df53fd03eaf4b1 removed the function print_extent_leaf --- static void print_extents(struct btrfs_root *root, struct extent_buffer *eb) { int i; @@ -81,10 +43,7 @@ static void print_extents(struct btrfs_root *root, struct

[PATCH] Seg fault when csum-tree root is corrupted.

2012-07-02 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Segmentation fault with the following trace when csum-tree is deliberately corrupted using btrfs-corrupt-block read block failed check_tree_block Couldn't setup csum tree checking extents Check tree block failed, want=29376512, have=0 :: read block failed

[PATCH] btrfs read error corrected message floods the console during recovery

2012-07-02 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Changing printk_in_rcu to printk_ratelimited_in_rcu will suffice --- fs/btrfs/extent_io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index aaa12c1..5ad8743 100644 --- a/fs/btrfs

[PATCH 2/2] btrfs: we are not yet ready if device is missing

2014-06-24 Thread Anand Jain
superblock on /dev/sdd, missing codepage or helper program, or other error fix this by checking if the device name is present in the BTRFS_IOC_DEVICES_READY ioctl Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/super.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH 1/2] btrfs: device list could grow infinite

2014-06-24 Thread Anand Jain
-- wrong fix this at device_list_add() to check and delete if the newly added disk path is already in the device list Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 41 + 1 file changed, 41 insertions(+) diff --git a/fs/btrfs

Re: [PATCH 1/2] btrfs: device list could grow infinite

2014-06-30 Thread Anand Jain
NACK for this. I have null pointer deference with this patch. extremely sorry. I am investigating.. Anand On 24/06/2014 20:51, Anand Jain wrote: Reproducer 1: modprobe -r btrfs; modprobe btrfs while true ; do mkfs.btrfs -f /dev/sde /dev/null 21; done CTLR-C we keep stale FSIDs. btrfs

[PATCH 1/2] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-06-30 Thread Anand Jain
[817abe52] system_call_fastpath+0x16/0x1b reproducer: mkfs.btrfs -draid1 -mraid1 /dev/sdg1 /dev/sdg2 btrfstune -S 1 /dev/sdg1 modprobe -r btrfs modprobe btrfs mount -o degraded /dev/sdg1 /btrfs btrfs dev add /dev/sdg3 /btrfs Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 12

[PATCH 2/2] btrfs: fix null pointer dereference in btrfs_show_devname when name is null

2014-06-30 Thread Anand Jain
reproducer: mkfs.btrfs -draid1 -mraid1 /dev/sdg1 /dev/sdg2 btrfstune -S 1 /dev/sdg1 modprobe -r btrfs modprobe btrfs mount -o degraded /dev/sdg1 /btrfs btrfs dev add /dev/sdg3 /btrfs Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH 1/2] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-06-30 Thread Anand Jain
The primary reason of this problem is that we didn't scan the system and find all the devices in the filesystem, if we scan the system, we can mount the filesystem successfully, needn't mount it with degraded option. so I think the right way to fix is to scan the system and find the device that

[PATCH 1/2] btrfs: device add must be sysloged

2014-06-30 Thread Anand Jain
when we add a new disk to the mounted btrfs we don't record it as of now, disk add is a critical change of btrfs configuration, it must be recorded in the syslog to help offline investigations of customer problems when reported. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs

[PATCH 2/2] btrfs: device delete must be sysloged

2014-06-30 Thread Anand Jain
as in the disk add patch, disk detached from the volume must be recorded in the syslog as well for the same reason. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/ioctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 16d20df

Re: [PATCH 1/2 v3 RESEND] Btrfs: device_list_add() should not update list when mounted

2014-07-01 Thread Anand Jain
Thanks for the commenting Wang. inline below. On 01/07/2014 15:16, Wang Shilong wrote: Hi Anand, Sorry for delay reply, more comments below: On 06/13/2014 12:26 PM, Anand Jain wrote: From: Anand Jain anand.j...@oracle.com device_list_add() is called when user runs btrfs dev scan, which

[PATCH 2/2 v2] btrfs: device delete must be sysloged

2014-07-01 Thread Anand Jain
as in the disk add patch, disk detached from the volume must be recorded in the syslog as well for the same reason. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David Sterba dste...@suse.cz --- v2: Accepts David's review comments, thanks fs/btrfs/ioctl.c | 4 1 file

[PATCH 1/2 v2] btrfs: device add must be sysloged

2014-07-01 Thread Anand Jain
when we add a new disk to the mounted btrfs we don't record it as of now, disk add is a critical change of btrfs configuration, it must be recorded in the syslog to help offline investigations of customer problems when reported. Signed-off-by: Anand Jain anand.j...@oracle.com Reviewed-by: David

Re: [PATCH 1/2] btrfs: device add must be sysloged

2014-07-01 Thread Anand Jain
On 02/07/2014 01:46, David Sterba wrote: On Tue, Jul 01, 2014 at 12:58:56AM +0800, Anand Jain wrote: when we add a new disk to the mounted btrfs we don't record it as of now, disk add is a critical change of btrfs configuration, it must be recorded in the syslog to help offline investigations

Re: [PATCH] Btrfs: fix wrong uevent target

2014-07-03 Thread Anand Jain
: On 07/03/2014 07:09 AM, Miao Xie wrote: CC Anand Jain Sorry, please ignore this patch. Anand wrote the same patch several days ago, so this bug fix belongs to Anand though he NACKed his patch at that time. It certainly looks right, but Anand had mentioned that he had a few questions on testing

Re: [PATCH 1/2] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-07-04 Thread Anand Jain
Miao, Chris, I appreciate your review comments, Miao. I am sorry for the delay, was stuck on this issue for a long time. more below. On 02/07/2014 10:38, Miao Xie wrote: On Mon, 30 Jun 2014 23:06:54 +0800, Anand Jain wrote: The primary reason of this problem is that we didn't scan

Re: [PATCH 1/2] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-07-04 Thread Anand Jain
(now used correct email id for Chris) On 04/07/2014 19:21, Anand Jain wrote: Miao, Chris, I appreciate your review comments, Miao. I am sorry for the delay, was stuck on this issue for a long time. more below. On 02/07/2014 10:38, Miao Xie wrote: On Mon, 30 Jun 2014 23:06:54 +0800, Anand

Re: [PATCH V2 7/9] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-07-06 Thread Anand Jain
On 03/07/2014 18:22, Miao Xie wrote: From: Anand Jain anand.j...@oracle.com when one of the device path is missing btrfs_device name is null. So this patch will check for that. stack: BUG: unable to handle kernel NULL pointer dereference at 0010 IP: [812e18c0] strlen+0x0

Re: [PATCH 1/2] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-07-07 Thread Anand Jain
It's a pity that the patch has been merged into the upstream kernel. Let's correct our miss before the next merge. What I found were new-bugs, those are not related to this patch. BTW, I sent some patches to fix the problems about seed device(including the updated patch of this one),

Re: [PATCH 1/2] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-07-07 Thread Anand Jain
It's a pity that the patch has been merged into the upstream kernel. Let's correct our miss before the next merge. What I found were new-bugs, those are not related to this patch. BTW, I sent some patches to fix the problems about seed device(including the updated patch of this one),

Re: [PATCH V2 7/9] btrfs: fix null pointer dereference in clone_fs_devices when name is null

2014-07-07 Thread Anand Jain
On 07/07/2014 12:22, Miao Xie wrote: On Mon, 7 Jul 2014 12:04:09 +0800, Anand Jain wrote: when one of the device path is missing btrfs_device name is null. So this patch will check for that. stack: BUG: unable to handle kernel NULL pointer dereference at 0010 IP

[PATCH RFC] btrfs: code optimize use btrfs_get_bdev_and_sb() at btrfs_scan_one_device

2014-07-07 Thread Anand Jain
(for review comments pls). btrfs_scan_one_device() needs SB, instead of doing it from scratch could use btrfs_get_bdev_and_sb() Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 51 ++- 1 file changed, 6 insertions(+), 45

[PATCH 1/2] btrfs: syslog when quota is enabled

2014-07-07 Thread Anand Jain
must syslog when btrfs working config changes so is to support offline investigation of the issues. --- fs/btrfs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 016a5eb..bb4a498 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -4216,6

[PATCH 2/2] btrfs: syslog when quota is disabled

2014-07-07 Thread Anand Jain
Offline investigations of the issues would need to know when quota is disabled. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index bb4a498..fd29978 100644 --- a/fs/btrfs/ioctl.c

[PATCH 1/1] btrfs-progs: fix compilation warning in function btrfs_read_dev_super

2014-07-15 Thread Anand Jain
disk-io.c: In function ‘btrfs_read_dev_super’: disk-io.c:1217: warning: ‘ret’ may be used uninitialized in this function Signed-off-by: Anand Jain anand.j...@oracle.com --- disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-io.c b/disk-io.c index 142197a..d10d647

[PATCH 1/2] btrfs-progs: dont break the string

2014-07-15 Thread Anand Jain
Signed-off-by: Anand Jain anand.j...@oracle.com --- mkfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkfs.c b/mkfs.c index 52b9a8d..cba4f02 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1336,8 +1336,8 @@ int main(int ac, char **av) case 'b

[PATCH 2/2] btrfs-progs: define BTRFS_MKFS_SMALL_VOLUME_SIZE for small volume

2014-07-15 Thread Anand Jain
mkfs cut of size '1024 * 1024 * 1024' to mark dev as small volume so to force mixed group. Use a define for that. Signed-off-by: Anand Jain anand.j...@oracle.com --- mkfs.c | 2 +- utils.c | 4 ++-- utils.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mkfs.c b/mkfs.c

[PATCH 1/1] btrfs-progs: fix wrong message about forcing the mixed group profile

2014-07-15 Thread Anand Jain
, single: total=16.00MiB, used=0.00B Signed-off-by: Anand Jain anand.j...@oracle.com --- utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils.c b/utils.c index 673134e..fbc5bde 100644 --- a/utils.c +++ b/utils.c @@ -705,10 +705,8 @@ int btrfs_prepare_device(int fd

[PATCH] xfstests/btrfs: _devmgt_add() to check if the device is back online

2014-07-17 Thread Anand Jain
/003 fails. This patch adds script to wait and test if the device is back online, and thus report the same to to the full log. Signed-off-by: Anand Jain anand.j...@oracle.com --- common/rc | 25 + 1 file changed, 25 insertions(+) diff --git a/common/rc b/common/rc index

[PATCH] btrfs-porgs: fix xfstest btrfs/023 random failure

2014-07-17 Thread Anand Jain
() at btrfs_prepare_device(). With this btrfs/023 has NOT failed consistently for several long iterations. Signed-off-by: Anand Jain anand.j...@oracle.com --- utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.c b/utils.c index fbc5bde..e144dfd 100644 --- a/utils.c +++ b/utils.c @@ -741,6 +741,8

[PATCH] xfstest/btrfs: check for matching kernel send stream ver 2

2014-07-21 Thread Anand Jain
-by: Anand Jain anand.j...@oracle.com --- common/rc | 5 + 1 file changed, 5 insertions(+) diff --git a/common/rc b/common/rc index 4a6511f..1c914bb 100644 --- a/common/rc +++ b/common/rc @@ -2223,6 +2223,11 @@ _require_btrfs_send_stream_version() if [ $? -ne 0

[PATCH] btrfs-progs: check if there is required kernel send stream version

2014-07-21 Thread Anand Jain
When kernel does not have the send stream version 2 patches, the btrfs send with --stream-version 2 would fail with out giving the details what is wrong. This patch will help to identify correctly that required kernel patches are missing. Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds

Re: [PATCH RFC] btrfs: code optimize use btrfs_get_bdev_and_sb() at btrfs_scan_one_device

2014-07-23 Thread Anand Jain
On 07/23/2014 01:42 AM, David Sterba wrote: On Tue, Jul 08, 2014 at 02:38:37AM +0800, Anand Jain wrote: (for review comments pls). btrfs_scan_one_device() needs SB, instead of doing it from scratch could use btrfs_get_bdev_and_sb() Please see http://git.kernel.org/cgit/linux/kernel/git

Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-25 Thread Anand Jain
On 07/25/2014 12:27 PM, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: num_bytes = (num_bytes / sectorsize) * sectorsize; but subsequent device adds don't. This seems a bit odd inconsistent, and it makes xfstest btrfs/011 _notrun(),

Re: [PATCH 01/10] Btrfs: Fix the problem that the replace destroys the seed filesystem

2014-07-25 Thread Anand Jain
device add dev1 mnt # umount mnt # mount dev1 mnt # btrfs replace start -f dev0 dev2 mnt # umount mnt # mount dev0 mnt It is because we erase the super block on the seed device. It is wrong, we should not change anything on the seed device. nice fix. Reviewed-by: Anand Jain anand.j

Re: [PATCH 02/10] Btrfs: don't write any data into a readonly device when scrub

2014-07-25 Thread Anand Jain
On 07/24/2014 11:37 AM, Miao Xie wrote: We should not write data into a readonly device especially seed device when doing scrub, skip those devices. Reviewed-by: Anand Jain anand.j...@oracle.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/scrub.c | 11 +++ 1 file

[PATCH] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-07-25 Thread Anand Jain
are still at 1 but the total_device is at 2, even after the seed device has been replaced in the above example. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/dev-replace.c | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev

[PATCH not for integration] btrfs-devlist: dumps btrfs_device and btrfs_fs_devices from kernel

2014-07-25 Thread Anand Jain
Anand Jain (1): btrfs: introduce BTRFS_IOC_GET_DEVS fs/btrfs/super.c | 86 +++ fs/btrfs/volumes.c | 145 + fs/btrfs/volumes.h | 3 + include/uapi/linux/btrfs.h | 53 - 4 files changed

[PATCH 1/1] btrfs-progs: introduce btrfs-devlist

2014-07-25 Thread Anand Jain
This is a small (debug) program to dump the device list in the raw format from the btrfs kernel. here I use ioctl which was introduced in the below kernel patch btrfs: introduce BTRFS_IOC_GET_DEVS Signed-off-by: Anand Jain anand.j...@oracle.com --- .gitignore | 1 + Makefile| 4

[PATCH 1/1] btrfs: introduce BTRFS_IOC_GET_DEVS

2014-07-25 Thread Anand Jain
The user land progs needs a simple way to see the raw list of disks and its parameters as seen by the btrfs kernel. As of now btrfs-devlist uses this ioctl. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/super.c | 86 +++ fs/btrfs/volumes.c

Re: [PATCH not for integration] btrfs-devlist: dumps btrfs_device and btrfs_fs_devices from kernel

2014-07-29 Thread Anand Jain
On 26/07/2014 15:05, Goffredo Baroncelli wrote: On 07/25/2014 02:33 PM, Anand Jain wrote: This would dump the following info: fs_address dev_address dev_root_addr root_fsid fsid name uuid (seed_fsid@seed_addr sprout_fsid@sprout_addr) (fs_num_devices fs_open_devices fs_rw_devices

[PATCH 4/4] btrfs: sysfs label interface should check for read only FS

2014-07-30 Thread Anand Jain
Not sure how this escaped many eyes so far Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/sysfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 266e201..e815ab2 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -377,6 +377,9

[PATCH 2/4] btrfs: code optimize: BTRFS_ATTR could handle the mode

2014-07-30 Thread Anand Jain
All that uses BTRFS_ATTR want mode to be set at 0444 so just do it at the define. And few spacing alignments. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/sysfs.c | 14 +++--- fs/btrfs/sysfs.h | 11 +++ 2 files changed, 14 insertions(+), 11 deletions(-) diff

[PATCH 3/4] btrfs: code optimize: BTRFS_ATTR_RW could set the mode

2014-07-30 Thread Anand Jain
BTRFS_ATTR_RW could set the mode and be inline with BTRFS_ATTR Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/sysfs.c | 2 +- fs/btrfs/sysfs.h | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 0524684..266e201

[PATCH 1/4] btrfs: use BTRFS_ATTR instead of btrfs_no_store()

2014-07-30 Thread Anand Jain
we have BTRFS_ATTR define to create sysfs RO file, use that. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/sysfs.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index d9c3ec6..404ad66 100644 --- a/fs/btrfs

Re: [PATCH] btrfs-porgs: fix xfstest btrfs/023 random failure

2014-07-31 Thread Anand Jain
On 29/07/2014 20:57, David Sterba wrote: On Thu, Jul 17, 2014 at 05:28:24PM +0800, Anand Jain wrote: xfstest btrfs/023 which does the following tests create_group_profile raid0 check_group_profile RAID0 create_group_profile raid1 check_group_profile RAID1 create_group_profile raid10

Re: [PATCH] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-07-31 Thread Anand Jain
On 30/07/2014 15:42, Miao Xie wrote: On Fri, 25 Jul 2014 20:33:34 +0800, Anand Jain wrote: After the seed device has been replaced the new target device is no more a seed device. So we need to bring that state in the fs_devices. reproducer: mount /dev/sdb /btrfs btrfs dev add /dev/sdc /btrfs

Re: integration tree updated

2014-08-01 Thread Anand Jain
Hi Chris, Looks like you missed Miao update (on 17 Jul) to back out the bad patch (below), and your integration branch (published on 25 Jul) still contains the same. [PATCH 2/2] Btrfs: fix wrong total device counter after removing a seed device You should remove it. Simple test cases

[PATCH 4/4] btrfs: update sprout seed pointer when seed fs is relinquished

2014-08-11 Thread Anand Jain
; __btrfs_close_devices(fs_devices); free_fs_devices(fs_devices); } Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index

[PATCH 3/4] btrfs: fix rw_devices miss match after seed replace

2014-08-11 Thread Anand Jain
-rw_devices); The problem here is that we did not add one to the rw_devices when we replace the seed device with a writable device. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/dev-replace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev

[PATCH 1/4] btrfs: preparatory to make btrfs_rm_dev_replace_srcdev() seed aware

2014-08-11 Thread Anand Jain
There is no logical change in this patch, just a preparatory patch, so that changes can be easily reasoned. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs

[PATCH 2/4] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-08-11 Thread Anand Jain
); After the seed device has been replaced the new target device is no more a seed device. So we need to update the device numbers in the fs_devices as pointed by the fs_info. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

Re: [PATCH] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-08-11 Thread Anand Jain
I have sent out the patch-set [PATCH 1/4] btrfs: preparatory to make btrfs_rm_dev_replace_srcdev() seed aware in replacement for this patch. Kindly use/review the above patch set. Thanks. Anand On 31/07/2014 16:45, Anand Jain wrote: On 30/07/2014 15:42, Miao Xie wrote: On Fri, 25

Re: [PATCH 4/4] btrfs: update sprout seed pointer when seed fs is relinquished

2014-08-12 Thread Anand Jain
On 12/08/2014 15:24, Miao Xie wrote: On Mon, 11 Aug 2014 17:42:56 +0800, Anand Jain wrote: We are not updating sprout fs seed pointer when all seed device is replaced. This patch will check if all seed device has been replaced and then update the sprout pointer accordingly. Same reproducer

Re: [PATCH 3/4] btrfs: fix rw_devices miss match after seed replace

2014-08-12 Thread Anand Jain
On 12/08/2014 15:29, Miao Xie wrote: On Mon, 11 Aug 2014 17:42:55 +0800, Anand Jain wrote: reproducer: reproducer: mount /dev/sdb /btrfs btrfs dev add /dev/sdc /btrfs btrfs rep start -B /dev/sdb /dev/sdd /btrfs umount /btrfs WARNING: CPU: 0 PID: 3882 at fs/btrfs

[PATCH 7/8] btrfs: fix typo in the log message

2014-08-13 Thread Anand Jain
there is no matching open parenthesis for the closing parenthesis Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/dev-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index fb0a7fa..64657b3 100644 --- a/fs

[PATCH 8/8] btrfs: rename total_bytes to avoid confusion

2014-08-13 Thread Anand Jain
we are assigning number_devices to the total_bytes, that's very confusing for a moment Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index bf99e82

[PATCH 4/8 v2] btrfs: update sprout seed pointer when seed fs is relinquished

2014-08-13 Thread Anand Jain
; __btrfs_close_devices(fs_devices); free_fs_devices(fs_devices); } Signed-off-by: Anand Jain anand.j...@oracle.com --- v2: fixes per Miao review. also keep the list pointer update to the last fs/btrfs/volumes.c | 21 + 1 file changed, 21

[PATCH 3/8] btrfs: fix rw_devices miss match after seed replace

2014-08-13 Thread Anand Jain
-rw_devices); The problem here is that we did not add one to the rw_devices when we replace the seed device with a writable device. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/dev-replace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev

[PATCH 1/8] btrfs: preparatory to make btrfs_rm_dev_replace_srcdev() seed aware

2014-08-13 Thread Anand Jain
There is no logical change in this patch, just a preparatory patch, so that changes can be easily reasoned. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs

[PATCH 2/8] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-08-13 Thread Anand Jain
); After the seed device has been replaced the new target device is no more a seed device. So we need to update the device numbers in the fs_devices as pointed by the fs_info. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

[PATCH 6/8] btrfs: rw_devices shouldn't be incremented for seed fs in btrfs_rm_dev_replace_srcdev()

2014-08-13 Thread Anand Jain
seed fs devices don't participate as rw_device, so don't increment rw_devices when the device being handled belongs to a seed fs. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs

[PATCH 5/8] btrfs: fix memory leak when there is no more seed device

2014-08-13 Thread Anand Jain
When we replace all the seed device in the system there is no point in just keeping the btrfs_fs_devices with out any device Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/volumes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index

Re: bug adding device to seed device, btrfs fi show fails

2014-08-13 Thread Anand Jain
Chris, For the seed replace issues. you have to try this patch set. Thanks. https://patchwork.kernel.org/patch/4716371/ Next, for the failing 'btrfs fi show' issue the following diff is the latest. The last attempt was .. [PATCH] btrfs: ioctl BTRFS_IOC_FS_INFO and BTRFS_IOC_DEV_INFO

xfstest/btrfs _require_scratch_dev_pool runs btrfsck

2014-08-14 Thread Anand Jain
Here below is a simple test script. I can't understand why _require_scratch_dev_pool should check consistency on the disk ? - #! /bin/bash # Test case 060 seq=`basename $0` seqres=$RESULT_DIR/$seq echo QA output created by $seq tmp=/tmp/$$ status=1# failure is the default!

Re: [PATCH 2/2] btrfs-progs: canonicalize dm device name before update kernel

2014-08-14 Thread Anand Jain
, which would return busy if the device path is being updated when the device is mounted. Can you try with Chris integration branch ? mainly the patch.. - commit 4e5c146442b23437d23a2bd81b95f13dfeaffe88 Author: Anand Jain anand.j...@oracle.com Date: Thu Jul 3 18:22:05 2014 +0800

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