Re: Can't mount removable device if device name changes.

2010-04-11 Thread TARUISI Hiroaki
Hi, What is your kernel version? Btrfs hols device names which construct filesystems and updating device name(device renaming) is merged just in last month. Regards, taruisi (2010/04/11 10:49), cwillu wrote: I've got a btrfs on an sd card, which I'm using as the root fs on a beagle. That's

Re: Btrfs - Unable to mount, can't read superblock?

2010-02-14 Thread TARUISI Hiroaki
Hi, This disk was used as /dev/sdd previously, and now it's named /dev/sdc, isn't it? If so, you can use this usb disk after reboot, or adjusting that the disk is recognized as /dev/sdd. Btrfs does not support device file renaming yet. Regards, taruisi (2010/02/13 21:45), Victor Hooi wrote:

Re: [PATCH]btrfs: Update existing btrfs_device for renaming device

2010-02-08 Thread TARUISI Hiroaki
Yes, exactly. I'll fix this. Thanks. Regards, taruisi (2010/02/09 14:23), Yang Hongyang wrote: TARUISI Hiroaki wrote: This patch updates device name in btrfs device. We can mount a device if its name are changed. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- fs/btrfs

[PATCH v2]btrfs: Update existing btrfs_device for renaming device

2010-02-08 Thread TARUISI Hiroaki
This patch updates device name in btrfs device information. We can mount a device if its name are changed. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- fs/btrfs/volumes.c |7 +++ 1 file changed, 7 insertions(+) Index: b/fs/btrfs/volumes.c

Re: [RFC] Move all btrfs command to only one command

2010-01-21 Thread TARUISI Hiroaki
Hi Goffredo, It sounds good for me though detailed points need more discussion. btrfs-progs seems unkind for operator as you mentioned, and many features will be implemented to btrfsctl from now, it's good that we arrange and unify btrfs-progs now. As for me, plain keywords(delete,defrag...) as

Re: snapshots of directories

2010-01-13 Thread TARUISI Hiroaki
, Andrey On Tue, Jan 12, 2010 at 5:19 AM, TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com wrote: In btrfs, snapshot is a clone of subvolume, not arbitrary directory. You specified '/root' directory and it is not subvolume, snapshot is created for parent subvolume, root of filesystem

Re: snapshot/subvolume removal

2010-01-12 Thread TARUISI Hiroaki
: TARUISI Hiroaki wrote: Thanks for your comment. I think your request is reasonable but because there's no information about a hierachy of snapshots in filesystem, we cannot know it for now. In future, these information may be supplied by application programs which manage all snapshots or backups

Re: snapshot/subvolume removal

2010-01-11 Thread TARUISI Hiroaki
(2010/01/10 07:01), Piavlo wrote: TARUISI Hiroaki wrote: For now, subvolumes and snapshots look like just directories. If you want to distinguish them, there's only an unusual way, that is, analyzing with btrfs-debug-tree. I posted patches for listing snapshots/subvolumes two months ago

Re: snapshot/subvolume removal

2010-01-11 Thread TARUISI Hiroaki
Thanks for reply and changing. I planned one more patch to list up all subvolumes under fs tree. This must be useful in case of mounting with subvol parameter. Regards, taruisi (2010/01/11 5:18), Chris Mason wrote: On Fri, Jan 08, 2010 at 05:28:42PM +0900, TARUISI Hiroaki wrote: For now

Re: snapshot/subvolume removal

2010-01-08 Thread TARUISI Hiroaki
: TARUISI Hiroaki wrote: Hi, We can delete snapshot with btrfsctl -D . It's available for your btrfs-progs version. -D works great Also how can I know if some directory is subvolume or snapshot or just a normal directory? Is there a way to list all the existing snapshots subvolumes under

Re: btrfs-progs: New utility to swap subvolumes

2010-01-05 Thread TARUISI Hiroaki
of subvolumes increases. Regards, taruisi (2010/01/05 2:20), Goffredo Baroncelli wrote: On Monday 04 January 2010, TARUISI Hiroaki wrote: Buon anno, Goffredo. あけまして おめでとう Taruisi, (I hope that happy new year is correctly written) Taking snapshot in btrfs is very easy, but handling snapshots is very

Re: snapshot/subvolume removal

2010-01-05 Thread TARUISI Hiroaki
Hi, We can delete snapshot with btrfsctl -D . It's available for your btrfs-progs version. And parameters of btrfsctl -s/S are not coherent at the last argument. In creating snapshots, the last argument implies the directory where subvolume is to be created, but in taking snapshots, the last

Re: btrfsctl exit with 1 when succeed

2009-12-27 Thread TARUISI Hiroaki
Baroncelli wrote: On Friday 25 December 2009, TARUISI Hiroaki wrote: I also want to know why this conversion is needed. This might be a typo, I think. Could someone tell us why? Can we fix this conversion? Or shouldn't we fix it considering back-compatibility? It is even worse

Re: btrfs-progs: New utility to swap subvolumes

2009-12-27 Thread TARUISI Hiroaki
, TARUISI Hiroaki wrote: New utility(btrfsrevert) added to swap subvolumes. With this utility, a subvolume (Source Subvolume) takes place of another subvolume (Target Subvolume), and target subvolume goes under hidden directory(.old_trees) in filesystem root(fs tree, tree id=5), and its name

Re: btrfsctl exit with 1 when succeed

2009-12-24 Thread TARUISI Hiroaki
I also want to know why this conversion is needed. This might be a typo, I think. Could someone tell us why? Can we fix this conversion? Or shouldn't we fix it considering back-compatibility? Regards, taruisi (2009/11/11 15:16), Gong, Zhipeng wrote: We'd like to use btrfsctl in a shell script,

[PATCH] btrfs-progs: check slash in deleting subvolumes.

2009-12-23 Thread TARUISI Hiroaki
in deletion same as snapshot/subvolume creating. But considering shell completion, this fix allows trailing slash. Regards, taruisi Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- btrfsctl.c | 11 +++ 1 file changed, 11 insertions(+) Index: b/btrfsctl.c

Re: BUG: Link from sub volume, then remove the subvolume - wrong link

2009-12-14 Thread TARUISI Hiroaki
of abuses... Regards, taruisi (2009/12/15 3:43), Andrew Lutomirski wrote: [cc: Chris -- This, or something like it, should probably go to stable, but it needs to make it to upstream somewhere first.] On Sun, Dec 13, 2009 at 6:42 PM, TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com wrote: Hi

Re: [PATCH] Btrfs: fix various things with the listing ioctl

2009-12-14 Thread TARUISI Hiroaki
--- Thank you for your patch. I've tested this patch and I found it works. And I'd like to add one line to prevent from another tiny leak. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- fs/btrfs/ioctl.c |1 + 1 file changed, 1 insertion(+) Index: b/fs/btrfs/ioctl.c

Re: BUG: Link from sub volume, then remove the subvolume - wrong link

2009-12-13 Thread TARUISI Hiroaki
Hi, We can see the patch in ML archive or at 'Patchwork' site. http://patchwork.kernel.org/patch/59519/ Thanks, taruisi (2009/12/13 3:39), Andy Lutomirski wrote: TARUISI Hiroaki wrote: Hi, I don't know how a hard link becomes to a soft link, hard link across subvolumes should

Re: [PATCH] Subvolume listing feature for ioctl.

2009-12-11 Thread TARUISI Hiroaki
Thank you for your report. I'm going to reprocude this panic and fix it maybe next week. Regards, taruisi (2009/12/12 5:57), Josef Bacik wrote: On Wed, Nov 18, 2009 at 02:42:14PM +0900, TARUISI Hiroaki wrote: New feature to list up subvolume/snapshots under specified tree of file

Re: [PATCH] Btrfs: change how we mount subvolumes

2009-12-06 Thread TARUISI Hiroaki
Hi, When I made snapshot listing, I thought 'subvol' parameter is not enough as G.Baroncelli wrote. I think nice feature too. (I tried to expand subvol parameter feature, by iterating dentry search(lookup_one_len) but I cannot treat dentries correctly yet. :) But, is 'subvol=name' not

Re: [RFC] Btrfs: add ioctl to set the default mount subvol

2009-12-06 Thread TARUISI Hiroaki
Hi, Josef. Thank you for your considering listing patch. For now, snapshot listing starts with mounted directory, but I thought listing by subvol id is needed, considering 'subvol' option (and now, your patch). I made a 'subvol id' patch, but if you have another idea, could you tell me?

Re: Q: list btrfs snapshots/subvolumes

2009-12-06 Thread TARUISI Hiroaki
Some questions: * how do I list available snapshots/subvolumes? As for this question, we will soon be able to list available snapshots/subvolumes with btrfsctl utility. But for now, we should count number of BTRFS_ROOT_ITEMs with btrfs-debug-tree or so. Regards, taruisi -- To unsubscribe

Re: Unable to mount loopback devices in RAID mode

2009-12-01 Thread TARUISI Hiroaki
-a', so # option string grows longer and longer as number of # devices increases... Leszek Ciesielski wrote: On Tue, Dec 1, 2009 at 6:56 AM, TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com wrote: Btrfs collects block device information when mount or mkfs (device_list_add in volumes.c), and know devid

Re: Unable to mount loopback devices in RAID mode

2009-11-30 Thread TARUISI Hiroaki
Hi, It seems to me this error is caused by device control policy of btrfs, not mkfs. This error occures not only on loopback devices, but also on normal block devices (with one difference in procedure). # mkfs.btrfs -m raid1 -d raid1 /dev/hdc1 /dev/hdc2 # reboot (- This is a difference.)

Re: [PATCH] Snapshot/subvolume listing feature

2009-11-17 Thread TARUISI Hiroaki
of a list) remain same as a patch I posted before. Regards, taruisi TARUISI Hiroaki wrote: Thank you for your advice. I'm aware of redundant search, but I didn't think of getdents like interface. I'll remake it without redundant search. Regards, taruisi Yan, Zheng wrote: 2009/11/16

[PATCH] Subvolume listing feature for ioctl.

2009-11-17 Thread TARUISI Hiroaki
New feature to list up subvolume/snapshots under specified tree of file is introduced to ioctl. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- fs/btrfs/ioctl.c | 283 +++ fs/btrfs/ioctl.h | 29 + 2 files changed, 312

[PATCH] Subvolume listing feature for btrfsctl.

2009-11-17 Thread TARUISI Hiroaki
New feature to list up subvolume/snapshots under specified tree of file is introduced to btrfsctl. This patch should apply with corresponding patch for kernel. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- btrfsctl.c | 191

[PATCH] Snapshot/subvolume listing feature

2009-11-15 Thread TARUISI Hiroaki
I made Snapshot/subvolume listing feature. This feature consists of two patches, for kernel(ioctl), and for progs(btrfsctl). I send these two patches as response of this mail soon. New option '-l' is introduced to btrfsctl for listing. If this option is specified, btrfsctl call new ioctl. New

Re: [PATCH] Snapshot/subvolume listing feature

2009-11-15 Thread TARUISI Hiroaki
I'm sorry, I forgot Signed-off line. Please add this line. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com -- 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

Re: [PATCH] Deny sys_link across subvolumes.

2009-11-12 Thread TARUISI Hiroaki
Chris Mason wrote: On Thu, Nov 12, 2009 at 04:14:26PM +0900, TARUISI Hiroaki wrote: From: Christian Parpart tra...@gentoo.org I rebased Christian Parpart's patch to deny hard link across subvolumes. Original patch modifies also btrfs_rename, but I excluded it because we can move across

[PATCH] Deny sys_link across subvolumes.

2009-11-11 Thread TARUISI Hiroaki
not allowed in Btrfs. btrfs_link checks root of 'to' directory is same as root of 'from' file. If not same, btrfs_link returns -EPERM. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- fs/btrfs/inode.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs

Re: Way to quickly revert back to a snapshot?

2009-10-30 Thread TARUISI Hiroaki
I'm trying to make this snapshots/subvolumes listing feature, I wonder how the interface should be. I tried to make this feature using ioctl interface, but I don't know how to notify all subvolume informations because number of subvolumes are not known before search. (It may work, that we call

Hard link across subvolumes

2009-10-29 Thread TARUISI Hiroaki
Hi, In Btrfs, a hard link across subvolumes should be prohibited, but not prohibited yet. (It may be convenient if possible, I think.) If we make a hard link like this, filesystem may abort or after umount/mount, contents of file may be swapped to contents of other file(with same i-node number in

[PATCH] btrfs-progs: bug fixes

2009-10-01 Thread TARUISI Hiroaki
Hi, I have tested btrfsck in some error case, such as item missing case or CRC error case or so. In this test session I found some bugs in btrfsck.c and disk-io.c in btrfs-progs. 1. The last pair of ptrs and items are not checked at 2 place of check_node/leaf. 2. Csum printed CRC error

[PATCH] btrfs-progs: CRC on disk printed correctly in CRC error message

2009-10-01 Thread TARUISI Hiroaki
I've tested btrfsck in CRC error case. However CRC on disk printed in error message is not correct (extent_buffer itsself is printed). Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- disk-io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/disk-io.c

[Patch] btrfsck.c typo?

2009-06-29 Thread TARUISI Hiroaki
Hi, Recently, I've red btrfsck.c of btrfs-progs to study the internal of btrfs. However, I may find typo in pick_next_pending() of btrfsck.c The first index of bits[] which is initialized should be 0, I think. Signed-off-by: TARUISI Hiroaki taruishi.hir...@jp.fujitsu.com --- diff --git

Redundant check in verify_parent_transid

2009-06-29 Thread TARUISI Hiroaki
Hi, In verify_parent_transid() of disk-io.c (btrfs-progs), I found redundant check. --- static int verify_parent_transid(struct extent_io_tree *io_tree, struct extent_buffer *eb, u64 parent_transid) { int ret; if (!parent_transid ||