Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
On 06/20/2012 11:49 PM, H. Peter Anvin wrote: > On 06/20/2012 11:06 AM, Goffredo Baroncelli wrote: >> >> Am not saying that we *should* move the kernel away from /boot. I am >> only saying that having the kernel near /lib/modules *has* some advantages. >> >> Few year ago there are some gains to hav

Re: [PATCH] Btrfs: fix dio write vs buffered read race

2012-06-20 Thread Miao Xie
On tue, 19 Jun 2012 10:58:09 -0400, Josef Bacik wrote: > Miao pointed out there's a problem with mixing dio writes and buffered > reads. If the read happens between us invalidating the page range and > actually locking the extent we can bring in pages into page cache. Then > once the write finish

Re: Feature request: true RAID-1 mode

2012-06-20 Thread H. Peter Anvin
Could you have a mode, though, where M = N at all times, so a user doesn't end up adding a new drive and get a nasty surprise? Chris Mason wrote: >On Wed, Jun 20, 2012 at 06:35:30PM -0600, Marios Titas wrote: >> On Wed, Jun 20, 2012 at 12:27 PM, H. Peter Anvin >wrote: >> > Yet another boot loa

Re: Feature request: true RAID-1 mode

2012-06-20 Thread Chris Mason
On Wed, Jun 20, 2012 at 06:35:30PM -0600, Marios Titas wrote: > On Wed, Jun 20, 2012 at 12:27 PM, H. Peter Anvin wrote: > > Yet another boot loader support request. > > > > Right now btrfs' definition of "RAID-1" with more than two devices is a > > bit unorthodox: it stores on any two drives.  "Tr

Re: Feature request: true RAID-1 mode

2012-06-20 Thread Marios Titas
On Wed, Jun 20, 2012 at 12:27 PM, H. Peter Anvin wrote: > Yet another boot loader support request. > > Right now btrfs' definition of "RAID-1" with more than two devices is a > bit unorthodox: it stores on any two drives.  "True RAID-1" would > instead store N copies on each of N devices, the same

Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread H. Peter Anvin
On 06/19/2012 11:31 PM, Fajar A. Nugraha wrote: > > IMHO a more elegant solution would be similar to what > (open)solaris/indiana does: make the boot parts (bootloader, > configuration) as a separate area, separate from root snapshots. In > solaris case IIRC this is will br /rpool/grub. > It is

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread H. Peter Anvin
On 06/20/2012 11:06 AM, Goffredo Baroncelli wrote: > > Am not saying that we *should* move the kernel away from /boot. I am > only saying that having the kernel near /lib/modules *has* some advantages. > > Few year ago there are some gains to have a separate /boot (ah, the time > when the bios we

btrfs hates lone HDDs on manycore systems

2012-06-20 Thread Sergei Trofimovich
Most of io workers in btrfs don't take into account amount of disks they deal with: fs/btrfs/disk-io.c:fs_info->thread_pool_size = min_t(unsigned long, num_online_cpus() + 2, 8); It might not be a problem for 'write-only' workloads, but it's a serious problem for read/write ones. Le

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
On 06/20/2012 09:15 PM, Helmut Hullen wrote: > Hallo, Goffredo, Hi Helmut, > > Du meintest am 20.06.12: > > [...] > >> Am not saying that we *should* move the kernel away from /boot. I am >> only saying that having the kernel near /lib/modules *has* some >> advantages. > >> Few year ago there

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Goffredo Baroncelli
On 06/20/2012 10:05 PM, Alexander Block wrote: > On Wed, Jun 20, 2012 at 8:11 PM, Goffredo Baroncelli > wrote: >> >> Yes please, could someone explain the reason behind this decision ? May >> be there are valid reasons, I am asking only to know which ones ? >> > The reason is that at the moment n

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Alexander Block
On Wed, Jun 20, 2012 at 8:11 PM, Goffredo Baroncelli wrote: > > Yes please, could someone explain the reason behind this decision ? May > be there are valid reasons, I am asking only to know which ones ? > The reason is that at the moment no user visible operations span mount boundaries and there

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Helmut Hullen
Hallo, Goffredo, Du meintest am 20.06.12: [...] > Am not saying that we *should* move the kernel away from /boot. I am > only saying that having the kernel near /lib/modules *has* some > advantages. > Few year ago there are some gains to have a separate /boot (ah, the > time when the bios were

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Goffredo Baroncelli
On 06/20/2012 08:07 PM, Calvin Walton wrote: > On Wed, 2012-06-20 at 19:27 +0200, Alexander Block wrote: >> On Wed, Jun 20, 2012 at 7:18 PM, Goffredo Baroncelli >> wrote: >>> Hi Alexander, >>> >>> On 06/20/2012 12:35 PM, Alexander Block wrote: The patch also does proper vfs mount checks, so

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Calvin Walton
On Wed, 2012-06-20 at 19:27 +0200, Alexander Block wrote: > On Wed, Jun 20, 2012 at 7:18 PM, Goffredo Baroncelli > wrote: > > Hi Alexander, > > > > On 06/20/2012 12:35 PM, Alexander Block wrote: > >> The patch also does proper vfs mount checks, so cross mount > >> point reflinks are not possible

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
HI, On 06/20/2012 07:41 PM, H. Peter Anvin wrote: > On 06/20/2012 09:34 AM, Goffredo Baroncelli wrote: >> >> At the first I tough that having the /boot separate could be a good >> thing. Unfortunately /boot contains both the bootloader code and the >> kernel image. The kernel image should be in syn

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread H. Peter Anvin
On 06/20/2012 09:34 AM, Goffredo Baroncelli wrote: > > At the first I tough that having the /boot separate could be a good > thing. Unfortunately /boot contains both the bootloader code and the > kernel image. The kernel image should be in sync with the contents of > /lib/modules/ > > This is

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Alexander Block
On Wed, Jun 20, 2012 at 7:18 PM, Goffredo Baroncelli wrote: > Hi Alexander, > > On 06/20/2012 12:35 PM, Alexander Block wrote: >> The patch also does proper vfs mount checks, so cross mount >> point reflinks are not possible with this patch. It only allows cross >> reflinks between two subvolumes

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Goffredo Baroncelli
Hi Alexander, On 06/20/2012 12:35 PM, Alexander Block wrote: > The patch also does proper vfs mount checks, so cross mount > point reflinks are not possible with this patch. It only allows cross > reflinks between two subvolumes which are in the same mount point. Thanks for working on that. Wha

Re: Device names

2012-06-20 Thread Goffredo Baroncelli
On 06/20/2012 03:37 PM, Chris Mason wrote: > On Tue, Jun 19, 2012 at 06:00:11PM -0600, H. Peter Anvin wrote: >> On 06/19/2012 04:51 PM, Chris Mason wrote: >>> >>> At mount time, we go through and verify the path names still belong to >>> the filesystem you thought they belonged to. The bdev is loc

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
On 06/20/2012 05:37 PM, H. Peter Anvin wrote: > On 06/20/2012 05:02 AM, Goffredo Baroncelli wrote: >> >> If I swap (via a rename) __active and __rollback, in the next boot my system >> uses a "good" copy of the root filesystem. This is a simple way to swap >> two subvolumes, without involving the

Feature request: true RAID-1 mode

2012-06-20 Thread H. Peter Anvin
Yet another boot loader support request. Right now btrfs' definition of "RAID-1" with more than two devices is a bit unorthodox: it stores on any two drives. "True RAID-1" would instead store N copies on each of N devices, the same way an actual RAID-1 would operate with an arbitrary number of de

Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread H. Peter Anvin
On 06/20/2012 06:34 AM, Chris Mason wrote: >> >> I want an algorithm, it doesn't have an API per se. I would really like >> to avoid relying on blkid and udev for this, though... that is pretty >> much a nonstarter. >> >> If the answer is to walk the tree then I'm fine with that. > > Ok, fair eno

Re: R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread H. Peter Anvin
On 06/20/2012 05:02 AM, Goffredo Baroncelli wrote: > > If I swap (via a rename) __active and __rollback, in the next boot my system > uses a "good" copy of the root filesystem. This is a simple way to swap > two subvolumes, without involving the boot logic > > Instead if I had tracked the subvo

Re: Device names

2012-06-20 Thread Chris Mason
On Tue, Jun 19, 2012 at 06:00:11PM -0600, H. Peter Anvin wrote: > On 06/19/2012 04:51 PM, Chris Mason wrote: > > > > At mount time, we go through and verify the path names still belong to > > the filesystem you thought they belonged to. The bdev is locked during > > the verification, so it won't

Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Chris Mason
On Tue, Jun 19, 2012 at 06:03:49PM -0600, H. Peter Anvin wrote: > On 06/19/2012 04:49 PM, Chris Mason wrote: > > On Mon, Jun 18, 2012 at 06:39:31PM -0600, H. Peter Anvin wrote: > >> I'm trying to figure out an algorithm from taking an arbitrary mounted > >> btrfs directory and break it down into: >

Re: Leaving Red Hat

2012-06-20 Thread Hugo Mills
On Wed, Jun 20, 2012 at 08:59:15AM -0400, Josef Bacik wrote: > Hello, > > Today is my last day at Red Hat, I will be joining Chris at Fusion IO. Blimey. It's all change round here, isn't it? Congratulations. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk =

Leaving Red Hat

2012-06-20 Thread Josef Bacik
Hello, Today is my last day at Red Hat, I will be joining Chris at Fusion IO. I'm sending this because a lot of people have been cc'ing me on patches recently to include them in btrfs-next, which is great, thank you! But tomorrow all of my email will be forwarded to my boss and I'd rather not ad

R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
Hi All, >Messaggio originale >Da: l...@fajar.net >Data: 20/06/2012 8.31 >A: "H. Peter Anvin" >Cc: >Ogg: Re: Subvolumes and /proc/self/mountinfo > >On Wed, Jun 20, 2012 at 10:22 AM, H. Peter Anvin wrote: >> a. Make a snapshot of the current root; >> b. Mount said snapshot; >> c. Install t

R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
HI all, >Messaggio originale >Da: h...@zytor.com >Data: 20/06/2012 5.22 >A: "cwillu" >Cc: , >Ogg: Re: Subvolumes and /proc/self/mountinfo > > >The concept of what is the "root" and what is the "path" is >straightforward for lesser filesystems: the root of the filesystem is >defined by th

R: Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Goffredo Baroncelli
HI all, >Messaggio originale >Da: chris.ma...@fusionio.com >Data: 20/06/2012 1.49 >A: "H. Peter Anvin" >Cc: "linux-btrfs@vger.kernel.org" >Ogg: Re: Subvolumes and /proc/self/mountinfo > >> b. Are there better ways (walking the tree using BTRFS_IOC_TREE_SEARCH?) >> to accomplish this than

[PATCH] btrfs: allow cross-subvolume file clone

2012-06-20 Thread Alexander Block
From: David Sterba Lift the EXDEV condition and allow different root trees for files being cloned, then pass source inode's root when searching for extents. Cloning is not allowed to cross vfsmounts, ie. when two subvolumes from one filesystem are mounted separately. Signed-off-by: David Sterba

[PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-20 Thread Alexander Block
Hello, This is the second attempt to bring in cross subvolume reflinks into btrfs. The first attempt was NAKed due to missing vfs mount checks and a clear description of what btrfs subvolumes are and probably also why cross subvolume reflinks are ok in the case of btrfs. This version of the patch

Re: Subvolumes and /proc/self/mountinfo

2012-06-20 Thread Hugo Mills
On Tue, Jun 19, 2012 at 04:35:59PM -0700, H. Peter Anvin wrote: > On 06/19/2012 07:22 AM, Calvin Walton wrote: > > > > All subvolumes are accessible from the volume mounted when you use -o > > subvolid=0. (Note that 0 is not the real ID of the root volume, it's > > just a shortcut for mounting it.

inspect-internal should this work ?

2012-06-20 Thread Sonu
Hi, on machine-a where btrfs is not root inspect-internal works fine. # filefrag -v /btrfs/tf1 Filesystem type is: 9123683e File size of /btrfs/tf1 is 409600 (100 blocks, blocksize 4096)  ext logical physical expected length flags    0   0 3101  13    1