Re: [PATCH 2/2] btrfs-progs: use clearer var names in is_ssd()

2013-04-12 Thread Zach Brown
> + devno= blkid_probe_get_devno(probe); *gasp* :) - z -- 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 2/2] Btrfs: introduce noextiref mount option

2013-04-12 Thread Eric Sandeen
On 4/11/13 5:35 AM, Miao Xie wrote: > Now, we set incompat flag EXTEND_IREF when we actually need insert a > extend inode reference, not when making a fs. But some users may hope > that the fs still can be mounted on the old kernel, and don't hope we > insert any extend inode references. So we intr

Re: [BUG] btrfs.fsck failing to fix corrupted block

2013-04-12 Thread David Sterba
On Sun, Apr 07, 2013 at 07:41:04AM +0530, Shripad Ratnaparkhi wrote: > Yup, that is exactly the case. > I got to know about no support of fsck.btrfs at boot up, so symlinked > btrfsck and built the initrd. https://btrfs.wiki.kernel.org/index.php/FAQ#What.27s_the_difference_between_btrfsck_and_fsck

Re: [PATCH 4/9 v2] btrfs-progs: check if btrfs kernel module is loaded

2013-04-12 Thread David Sterba
On Wed, Apr 10, 2013 at 04:23:21PM +0800, Anand Jain wrote: > diff --git a/cmds-device.c b/cmds-device.c > index a90fb67..0e1e6de 100644 > --- a/cmds-device.c > +++ b/cmds-device.c > @@ -185,9 +185,10 @@ static const char * const cmd_scan_dev_usage[] = { > > static int cmd_scan_dev(int argc, cha

Re: [PATCH 3/9] btrfs-progs: mkfs should first check all disks before writing to a disk

2013-04-12 Thread David Sterba
On Fri, Apr 05, 2013 at 01:54:57PM +0800, Anand Jain wrote: > In the cases where one of the disk is not suitable for > btrfs, then we would fail the mkfs, however we determine > that after we have written btrfs to the preceding disks. > At this time if user changes mind for not to use btrfs > will

Re: [PATCH 2/9] btrfs-progs: no pending balance is not an error

2013-04-12 Thread David Sterba
On Fri, Apr 05, 2013 at 01:54:56PM +0800, Anand Jain wrote: > --- a/cmds-balance.c > +++ b/cmds-balance.c > @@ -662,8 +662,12 @@ static int cmd_balance_status(int argc, char **argv) > close(fd); > > if (ret < 0) { > + if (e == ENOTCONN) { > + printf("No

Re: Is it currently possible to remount subvolume (not the whole filesystem) with nodatacow?

2013-04-12 Thread David Sterba
On Fri, Apr 12, 2013 at 02:34:59PM +0200, Adam Ryczkowski wrote: > If so, please tell me, what is the first confirmed kernel version, which > supports this. Or at least, is it available on Kernel 3.5. > > I know, that it is possible to assign nodatacow attribute to files with > "chattr +C ", if th

Is it currently possible to remount subvolume (not the whole filesystem) with nodatacow?

2013-04-12 Thread Adam Ryczkowski
If so, please tell me, what is the first confirmed kernel version, which supports this. Or at least, is it available on Kernel 3.5. I know, that it is possible to assign nodatacow attribute to files with "chattr +C ", if the file has zero length. Thank you -- Adam Ryczkowski +48505919892 Sk

[PATCH V2] Btrfs: add a rb_tree to improve performance of ulist search

2013-04-12 Thread Wang Shilong
From: Wang Shilong Walking backref tree and btrfs quota rely on ulist very much. This patch tries to use rb_tree to speed up search time. The original code always checks whether an element exists before adding a new element, however it costs O(n). I try to add a rb_tree in the ulist,this is onl

Re: [PATCH v3 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-12 Thread Wang Shilong
Hello, > On Fri, 12 Apr 2013 16:39:55 +0800, Wang Shilong wrote: > [...] >>> + if (ritem && !is_v0) { >>> + rinfo->cgen = btrfs_root_ctransid(ritem); >>> + rinfo->ogen = btrfs_root_otransid(ritem); >>> + rinfo->sgen = btrfs_root_stransid(ritem); >>> + rinf

Re: [PATCH v3 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-12 Thread Stefan Behrens
On Fri, 12 Apr 2013 16:39:55 +0800, Wang Shilong wrote: [...] >> +if (ritem && !is_v0) { >> +rinfo->cgen = btrfs_root_ctransid(ritem); >> +rinfo->ogen = btrfs_root_otransid(ritem); >> +rinfo->sgen = btrfs_root_stransid(ritem); >> +rinfo->rgen = bt

Re: [PATCH v3 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-12 Thread Wang Shilong
Hello Stefan, [snip] .. > -static int update_root(struct root_lookup *root_lookup, > -u64 root_id, u64 ref_tree, u64 root_offset, u64 flags, > -u64 dir_id, char *name, int name_len, u64 ogen, u64 gen, > -time_t ot, void *uuid, void *puui

[PATCH v3 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-12 Thread Stefan Behrens
The parent UUID, all generation values and all timestamps that are available in the root_item are added. Signed-off-by: Stefan Behrens --- v2 -> v3: - After Wang Shilong explained the purpose of one part of the code where I added a "TODO: what is it good for?" comment, a mistake was visible,

Re: [PATCH v2 3/4] Btrfs-progs: add more subvol fields to btrfs-list

2013-04-12 Thread Stefan Behrens
On Fri, 12 Apr 2013 09:42:43 +0800, Wang Shilong wrote: >> +if (ritem && !is_v0) { >> +rinfo->cgen = btrfs_root_ctransid(ritem); >> +rinfo->ogen = btrfs_root_otransid(ritem); >> +rinfo->sgen = btrfs_root_stransid(ritem); >> +rinfo->rgen = btrfs_ro

[PATCH] btrfs-progs: a copy of superblock is zero may not mean btrfs is not there

2013-04-12 Thread Anand Jain
If one of the copy of the superblock is zero it does not confirm to us that btrfs isn't there on that disk. When we are having more than one copy of superblock we should rather let the for loop to continue to check other copies. the following test case and results would justify the fix mkfs.btrfs

Re: [PATCH v2 4/4] Btrfs-progs: enhance 'btrfs subvolume list'

2013-04-12 Thread Stefan Behrens
On Fri, 12 Apr 2013 08:58:27 +0800, Wang Shilong wrote: >> "btrfs subvolume list" gets a new option "--fields=..." which allows >> to specify which pieces of information about subvolumes shall be >> printed. This is necessary because this commit also adds all the so >> far missing items from the ro

Re: [PATCH 2/2] Btrfs: introduce noextiref mount option

2013-04-12 Thread Jan Schmidt
On Fri, April 12, 2013 at 06:13 (+0200), Miao Xie wrote: > Onthu, 11 Apr 2013 16:29:48 +0200, Jan Schmidt wrote: >> On Thu, April 11, 2013 at 12:35 (+0200), Miao Xie wrote: >>> Now, we set incompat flag EXTEND_IREF when we actually need insert a >>> extend inode reference, not when making a fs.