Re: Create subvolume from a directory?

2012-03-28 Thread Liu Bo
On 03/29/2012 12:54 AM, Goffredo Baroncelli wrote: >> > > Could you elaborate which would be the issue ? > "cp --reflink"-ing a file is not different than snapshotting a file. In > any case I could mount a snapshot and not the source subvolume. > > > We already have a debate about this "cross-

Re: "not enough space" with "data raid0"

2012-03-28 Thread Duncan
Alex posted on Wed, 28 Mar 2012 22:11:01 + as excerpted: > Phillip Susi ubuntu.com> writes: > > >> So currently btrfs's concept of raid0 is "stripe across as many disks >> as possible, with a minimum of 2 disks". Is there any reason for that >> minimum? I don't see why it can't allow only

[PATCH 17/19] btrfs: Convert to new freezing mechanism

2012-03-28 Thread Jan Kara
We convert btrfs_file_aio_write() to use new freeze check. We also add proper freeze protection to btrfs_page_mkwrite(). Checks in cleaner_kthread() and transaction_kthread() can be safely removed since btrfs_freeze() will lock the mutexes and thus block the threads (and they shouldn't have anythi

[PATCH 00/19 v4] Fix filesystem freezing deadlocks

2012-03-28 Thread Jan Kara
Hello, here is the fourth iteration of my patches to improve filesystem freezing. Filesystem freezing is currently racy and thus we can end up with dirty data on frozen filesystem (see changelog patch 06 for detailed race description). This patch series aims at fixing this. To be able to bloc

[PATCH 04/19] btrfs: Push mnt_want_write() outside of i_mutex

2012-03-28 Thread Jan Kara
When mnt_want_write() starts to handle freezing it will get a full lock semantics requiring proper lock ordering. So push mnt_want_write() call consistently outside of i_mutex. CC: Chris Mason CC: linux-btrfs@vger.kernel.org Signed-off-by: Jan Kara --- fs/btrfs/ioctl.c | 23 +++---

Re: "not enough space" with "data raid0"

2012-03-28 Thread Alex
Phillip Susi ubuntu.com> writes: > > So currently btrfs's concept of raid0 is "stripe across as many disks as > possible, with a minimum of 2 disks". Is there any reason for that > minimum? I don't see why it can't allow only one if that's the best it > can manage. > That's called "Single"

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Niels de Carpentier
> I'd like to see how they do that. The fact is you are still going to get > random > seeks since you have to binary search the blocks in an entire row since > there is > no way you can read a several thousand block row into memory to search it, > so > once your rows get pretty big you are doing j

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Josef Bacik
On Wed, Mar 28, 2012 at 10:44:03PM +0200, Niels de Carpentier wrote: > > > > > You are still going to have to have at least 29 levels to accomodate 1 > > billion > > objects, though they won't all be full (sorry I missed the must be full or > > empty > > bit). So it looks like we'll have to actua

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Niels de Carpentier
> > You are still going to have to have at least 29 levels to accomodate 1 > billion > objects, though they won't all be full (sorry I missed the must be full or > empty > bit). So it looks like we'll have to actually search what 13 rows right? > So > still more rows than a b-tree, and again you

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Zach Brown
I imagine there is, but based on what little information they've shown I don't see how it's a hands down win against b-trees. If anything we're talking about having to solve really complex problems in order to get any sort of good performance out of this thing. Oh, absolutely. Tack on COW an

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Josef Bacik
On Wed, Mar 28, 2012 at 03:50:07PM -0400, Zach Brown wrote: > > >but lets say O(log N/2) where N is the number of elements in the row. > >So in the situation I describe you are looking at having to do minimum > >of 29 reads, one for each row, > > Hmm. > > Levels are powers of two and are either

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Zach Brown
but lets say O(log N/2) where N is the number of elements in the row. So in the situation I describe you are looking at having to do minimum of 29 reads, one for each row, Hmm. Levels are powers of two and are either full or empty. So the total item count tells you which levels are full or e

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Josef Bacik
On Wed, Mar 28, 2012 at 02:42:04PM -0400, Josef Bacik wrote: > On Wed, Mar 28, 2012 at 02:25:39PM +, Danny Piccirillo wrote: > > The case has been made on Phoronix for F-Trees: They makes use hard > > drive speeds, not (relatively slow) access times; beat SSD's; and scale > > perfectly across

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/28/2012 02:42 PM, Josef Bacik wrote: > On Wed, Mar 28, 2012 at 02:25:39PM +, Danny Piccirillo wrote: >> The case has been made on Phoronix for F-Trees: They makes use >> hard drive speeds, not (relatively slow) access times; beat >> SSD's; an

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Josef Bacik
On Wed, Mar 28, 2012 at 02:25:39PM +, Danny Piccirillo wrote: > The case has been made on Phoronix for F-Trees: They makes use hard > drive speeds, not (relatively slow) access times; beat SSD's; and scale > perfectly across multiple cores with hundreds of millions of entries. > > http://en.w

Re: "not enough space" with "data raid0"

2012-03-28 Thread Phillip Susi
On 3/17/2012 8:19 AM, Hugo Mills wrote: Where is the problem, how can I use the full space? You can't. btrfs requires RAID-0 to be at least two devices wide (otherwise it's not striped at all, which is the point of RAID-0). If you want to use the full capacity of both disks and don't care a

[PATCH] btrfs-progs: enforce block count on all devices in mkfs

2012-03-28 Thread Josef Bacik
I had a test that creates a 7gig raid1 device but it was ending up wonky because the second device that gets added is the full size of the disk instead of the limited size. So enforce the limited size on all disks passed in at mkfs time, otherwise our threshold calculations end up wonky when doing

Re: Create subvolume from a directory?

2012-03-28 Thread Goffredo Baroncelli
Hello Liu On 03/28/2012 04:18 AM, Liu Bo wrote: On 03/28/2012 06:24 AM, Matthias G. Eckermann wrote: # time cp -a --reflink /var/lib/lxc/installserver_tmp/rootfs /var/lib/lxc/installserver This is too much weird. AFAIK, clone between different subvolumes should be forbidden. So this wou

Re: Fractal Tree Indexing over B-Trees?

2012-03-28 Thread C Anthony Risinger
On Wed, Mar 28, 2012 at 9:25 AM, Danny Piccirillo wrote: > The case has been made on Phoronix for F-Trees: They makes use hard > drive speeds, not (relatively slow) access times; beat SSD's; and scale > perfectly across multiple cores with hundreds of millions of entries. > > http://en.wikipedia.o

Fractal Tree Indexing over B-Trees?

2012-03-28 Thread Danny Piccirillo
The case has been made on Phoronix for F-Trees: They makes use hard drive speeds, not (relatively slow) access times; beat SSD's; and scale perfectly across multiple cores with hundreds of millions of entries. http://en.wikipedia.org/wiki/TokuDB#Fractal_tree_indexes How TokuDB Fractal Tree Datab

Re: Create subvolume from a directory?

2012-03-28 Thread Alex
David Sterba jikos.cz> writes: > > On Tue, Mar 27, 2012 at 05:19:06PM +, Alex wrote: > > Can I create/convert a existing (btrfs) directory into a subvolume? > > For the reference there's an entry at the wiki: > > http://btrfs.ipv5.de/index.php?title=UseCases#Can_I_take_a_snapshot_of_a_dire

Re: Honest timeline for btrfsck

2012-03-28 Thread Duncan
Danny Piccirillo posted on Wed, 28 Mar 2012 06:15:41 + as excerpted: > Chris Mason oracle.com> writes: >> >> People have already started picking up #4, fujitsu had some patches in >> this direction that we'll keep developing with. >> >> I stepped back to add some directory metadata fixups a

Re: Create subvolume from a directory?

2012-03-28 Thread David Sterba
On Tue, Mar 27, 2012 at 05:19:06PM +, Alex wrote: > Can I create/convert a existing (btrfs) directory into a subvolume? For the reference there's an entry at the wiki: http://btrfs.ipv5.de/index.php?title=UseCases#Can_I_take_a_snapshot_of_a_directory.3F as noted in the thread, this relies on

Re: Create subvolume from a directory?

2012-03-28 Thread David Sterba
On Wed, Mar 28, 2012 at 08:46:13AM +0700, Fajar A. Nugraha wrote: > On Wed, Mar 28, 2012 at 5:24 AM, Matthias G. Eckermann wrote: > > While the time measurement might be flawed due to the subvol > > actions inbetween, caching etc.: I tried several times, and > > "cp --reflinks" always is multiple