Re: Fullfil the bmap operation

2010-05-19 Thread Chris Mason
On Wed, May 19, 2010 at 04:09:21PM +0800, liubo wrote: > Hi, > > When we tested btrfs with Josef's test-tools, a FAIL > came to us. > > After looking into it, we found that aops->bmap had > been deleted because btrfs's COW + swapfile led to > corruption. > > So, is there a plan for this bmap ope

[PATCH 4/6] fs: kill blockdev_direct_IO_no_locking

2010-05-19 Thread Josef Bacik
Christoph said he'd rather everybody use __blockdev_direct_IO directly instead of having a bunch of random helper functions, so thats what this patch does. It's a basic change, I've tested it with xfstests on ext4 and xfs. Thanks, Signed-off-by: Josef Bacik --- fs/block_dev.c |

[PATCH 5/6] Btrfs: add basic DIO read/write support V6

2010-05-19 Thread Josef Bacik
V1->V2 -Use __blockdev_direct_IO instead of helper -Use KM_IRQ0 for kmap instead of KM_USER0 V2->V3 -Update the submit function to work with my submit hook changes -Add DIO write support V3->V4 -Use local_irq_save/restore around the KM_IRQ0 kmaps V4->V5 -Use ordered extents for the DIO stuff so

[PATCH 6/6] Btrfs: do aio_write instead of write V2

2010-05-19 Thread Josef Bacik
V1->V2 -Fix some things that git rebase screwed up -Use iov_iter_count() instead of count in a few places -Update pos if we had a short read/write In order for AIO to work, we need to implement aio_write. This patch converts our btrfs_file_write to btrfs_aio_write. I've tested this with xfstests

[PATCH 2/6] direct-io: add a hook for the fs to provide its own submit_bio function V3

2010-05-19 Thread Josef Bacik
V1->V2: -Changed dio_end_io to EXPORT_SYMBOL_GPL -Removed the own_submit blockdev dio helper -Removed the boundary change V2->V3 -Made it so we keep track of what the current logical offset in the file we have a BIO setup for so we can pass it into the submit_io hook. Because BTRFS can do RAID an

[PATCH 3/6] direct-io: do not merge logically non-contiguous requests

2010-05-19 Thread Josef Bacik
Btrfs cannot handle having logically non-contiguous requests submitted. For example if you have Logical: [0-4095][HOLE][8192-12287] Physical: [0-4095] [4096-8191] Normally the DIO code would put these into the same BIO's. The problem is we need to know exactly what offset is associated wi

[PATCH 1/6] fs: allow short direct-io reads to be completed via buffered IO V2

2010-05-19 Thread Josef Bacik
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read, just in case it was actually a short read and we need to just return. This is similar to what already happens in the write case. If we have a short read while doing O_DIRECT, instead of just returning, fallthrough and t

Re: [PATCH] btrfs: check alloc return value before use handle and struct

2010-05-19 Thread Andi Kleen
Steven Liu writes: > diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c > index e9103b3..230a131 100644 > --- a/fs/btrfs/dir-item.c > +++ b/fs/btrfs/dir-item.c > @@ -142,6 +142,8 @@ int btrfs_insert_dir_item(struct > btrfs_trans_handle *trans, struct btrfs_root > key.offset = btrfs_name_

Re: default subvolume abilities/restrictions

2010-05-19 Thread Goffredo Baroncelli
On Wednesday, May 19, 2010, C Anthony Risinger wrote: > On Wed, May 19, 2010 at 6:56 AM, kreij...@libero.it wrote: > > Hi Anthony, > > > > I think that for you may be interested to read this thread > > > > http://kerneltrap.org/mailarchive/linux-btrfs/2009/11/20/6588643/thread > > > > and to read

Re: default subvolume abilities/restrictions

2010-05-19 Thread C Anthony Risinger
On Wed, May 19, 2010 at 9:20 AM, Chris Ball wrote: > Hi, > >   > moving along to a question... can the default subvolume be >   > swapped/removed/renamed/popped/shifted? > > I think "btrfs subvolume list; btrfs subvolume set-default " > does what you need. > > - Chris. maybe i'm missing somethin

Re: default subvolume abilities/restrictions

2010-05-19 Thread Chris Ball
Hi, > moving along to a question... can the default subvolume be > swapped/removed/renamed/popped/shifted? I think "btrfs subvolume list; btrfs subvolume set-default " does what you need. - Chris. -- Chris Ball One Laptop Per Child -- To unsubscribe from this list: send the line "unsu

Re: [PATCH 5/5] Btrfs: do aio_write instead of write

2010-05-19 Thread Josef Bacik
On Tue, May 18, 2010 at 05:05:47PM -0400, Josef Bacik wrote: > In order for AIO to work, we need to implement aio_write. This patch converts > our btrfs_file_write to btrfs_aio_write. I've tested this with xfstests and > nothing broke, and the AIO stuff magically started working. Thanks, > > Si

Re: default subvolume abilities/restrictions

2010-05-19 Thread C Anthony Risinger
On Wed, May 19, 2010 at 6:56 AM, kreij...@libero.it wrote: > Hi Anthony, > > I think that for you may be interested to read this thread > > http://kerneltrap.org/mailarchive/linux-btrfs/2009/11/20/6588643/thread > > and to read a my blog about this argument > > http://kreijack.blogspot.com/2010/01

Re: implicit declaration of function 'strndup'

2010-05-19 Thread Christian Kujau
ping? (is nobody using btrfs-progs any more?) On Fri, 14 May 2010 at 06:27, Christian Kujau wrote: > Hi, > > I've sent this (see below) a while ago, the patch from Miao Xie is from > March even. I still cannot compile btrfs-progs without his fix. Please > include this fix into the repo. > > T

R: default subvolume abilities/restrictions

2010-05-19 Thread kreij...@libero.it
Hi Anthony, I think that for you may be interested to read this thread http://kerneltrap.org/mailarchive/linux-btrfs/2009/11/20/6588643/thread and to read a my blog about this argument http://kreijack.blogspot.com/2010/01/linux-btrfs-example-of-layout.html Regards Goffredo >Messaggio ori

[PATCH] btrfs: check alloc return value before use handle and struct

2010-05-19 Thread Steven Liu
check alloc return value before use handle and struct in btrfs_alloc_path will alloc memory,when there have no space it will return NULL Signed-off-by: LiuQi --- fs/btrfs/dir-item.c|2 ++ fs/btrfs/export.c |5 + fs/btrfs/inode.c |5 + fs/btrfs/transaction.c |

Fullfil the bmap operation

2010-05-19 Thread liubo
Hi, When we tested btrfs with Josef's test-tools, a FAIL came to us. After looking into it, we found that aops->bmap had been deleted because btrfs's COW + swapfile led to corruption. So, is there a plan for this bmap operation? -- To unsubscribe from this list: send the line "unsubscribe linux

the flushoncommit mount option

2010-05-19 Thread Mathijs Kwik
Hi all, Over the past few months, I've been trying out btrfs on separate mountpoints. I like it very much so I would like to try it on my home or root volumes and see if I can do something fun with the snapshots. As btrfs still isn't production-ready, I made sure everything is backed-up to an exte