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

2010-05-03 Thread Josef Bacik
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 try to read the rest via buffered IO. BTRFS needs this because if we encounter a compressed or inline extent during DIO, we need to fallback on buffe

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

2010-05-03 Thread Josef Bacik
Because BTRFS can do RAID and such, we need our own submit hook so we can setup the bio's in the correct fashion, and handle checksum errors properly. So there are a few changes here 1) The submit_io hook. This is straightforward, just call this instead of submit_bio. 2) Honor the boundary flag

[PATCH 3/3] Btrfs: add basic DIO read support

2010-05-03 Thread Josef Bacik
This provides basic DIO support for reads only. It does not do any of the work to recover from mismatching checksums, that will come later. A few design changes have been made from Jim's code (sorry Jim!) 1) Use the generic direct-io code. Jim originally re-wrote all the generic DIO code in ord

raild[56] again

2010-05-03 Thread Roy Sigurd Karlsbakk
Hi all Is raid[56] coming to btrfs? There was some talk about it a year back or so, but I haven't seen anything yet Best regards roy -- Roy Sigurd Karlsbakk (+47) 97542685 r...@karlsbakk.net http://blogg.karlsbakk.net/ -- I all pedagogikk er det essensielt at pensum presenteres intelligibel

Re: raild[56] again

2010-05-03 Thread Tomasz Torcz
On Mon, May 03, 2010 at 10:02:10PM +0200, Roy Sigurd Karlsbakk wrote: > Hi all > > Is raid[56] coming to btrfs? There was some talk about it a year back or so, > but I haven't seen anything yet Look again, there was an email just few days ago: 3705 Apr 29 David Woodhouse ( 13K) Updatin

Re: crash in btrfsck, btrfs-debug-tree, etc

2010-05-03 Thread Vladimir G. Ivanovic
No help, eh? At the minimum, it would be nice if btrfsck were fixed... Unfortunately, now btrfs will NOT mount the drive, so I am now completely without data. The mount error is: kernel: device fsid c64b56bd1c869bb3-e85f95a29c7dd3ad devid 1 transid 21547 /dev/sdc1 kernel: btrfs bad tree b

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

2010-05-03 Thread Dave Chinner
On Mon, May 03, 2010 at 01:27:02PM -0400, Josef Bacik wrote: > 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 try to > read the rest via buffered IO. BTRFS needs this because if we encounter a >

boot fsck of btrfs

2010-05-03 Thread Alex Brandt
I found recently that when I enabled the boot time check of the btrfs filesystem that: one, there was no fsck.btrfs so it wasn't getting called; and two, the parameters that were being passed were not being handled appropriately by btrfsck. I have created a hack that allows the second problem t

[PATCH] btrfs: Prevent creation of files larger than RLIMIT_FSIZE using fallocate

2010-05-03 Thread Nikanth Karthikesan
Prevent creation of files larger than RLIMIT_FSIZE using fallocate. Currently using posix_fallocate one can bypass an RLIMIT_FSIZE limit and create a file larger than the limit. Add a check for that. Signed-off-by: Nikanth Karthikesan --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index