Re: [PATCH][RFC] fast file mapping for loop

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Phillips
Date: Friday, January 11, 2008 - 11:17 am

Hi Jens,

This looks really useful.

On Wednesday 09 January 2008 00:52, Jens Axboe wrote:

Get_block methods are pretty fast and you have caching in the level 
above you, so you might be able to get away with no cache of physical 
addresses at all, in which case you just need i_mutex and i_alloc_sem 
at get_block time.  This would save a pile of code and still have the 
main benefit of avoiding double caching.

If you use ->get_block instead of bmap, it will fill in file holes for 
you, but of course get_block is not exposed, and Al is likely to bark 
at anyone who exposes it.

Instead of exposing get_block you could expose an aops method 
like ->bio_transfer that would hide the use of *_get_block in a library 
routine, just as __blockdev_direct_IO does.  Chances are, there are 
other users besides loop that would be interested in a generic way of 
performing bio transfers to files.

I presume you would fall back to the existing approach for any 
filesystem without get_block.  You could handle this transparently with 
a default library method that does read/write.

Regards,

Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH][RFC] fast file mapping for loop, Jens Axboe, (Wed Jan 9, 1:52 am)
Re: [PATCH][RFC] fast file mapping for loop, Christoph Hellwig, (Wed Jan 9, 2:31 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Wed Jan 9, 2:43 am)
Re: [PATCH][RFC] fast file mapping for loop, Chris Mason, (Wed Jan 9, 4:00 am)
Re: [PATCH][RFC] fast file mapping for loop, Andi Kleen, (Wed Jan 9, 8:34 am)
Re: [PATCH][RFC] fast file mapping for loop, Alasdair G Kergon, (Wed Jan 9, 4:16 pm)
Re: [PATCH][RFC] fast file mapping for loop, Nick Piggin, (Wed Jan 9, 6:42 pm)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 1:31 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 1:34 am)
Re: [PATCH][RFC] fast file mapping for loop, Christoph Hellwig, (Thu Jan 10, 1:37 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 1:42 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 1:43 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 1:44 am)
Re: [PATCH][RFC] fast file mapping for loop, Christoph Hellwig, (Thu Jan 10, 1:54 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 2:01 am)
Re: [PATCH][RFC] fast file mapping for loop, Peter Zijlstra, (Thu Jan 10, 2:37 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 2:49 am)
Re: [PATCH][RFC] fast file mapping for loop, Peter Zijlstra, (Thu Jan 10, 2:52 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 3:02 am)
Re: [PATCH][RFC] fast file mapping for loop, Peter Zijlstra, (Thu Jan 10, 3:20 am)
Re: [PATCH][RFC] fast file mapping for loop, Chris Mason, (Thu Jan 10, 5:47 am)
Re: [PATCH][RFC] fast file mapping for loop, Chris Mason, (Thu Jan 10, 5:53 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 5:57 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Thu Jan 10, 6:03 am)
Re: [PATCH][RFC] fast file mapping for loop, Chris Mason, (Thu Jan 10, 6:46 am)
Re: [PATCH][RFC] fast file mapping for loop, Bill Davidsen, (Thu Jan 10, 6:25 pm)
Re: [PATCH][RFC] fast file mapping for loop, Mikulas Patocka, (Fri Jan 11, 12:39 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Fri Jan 11, 12:58 am)
Re: [PATCH][RFC] fast file mapping for loop, Daniel Phillips, (Fri Jan 11, 11:17 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Fri Jan 11, 11:23 am)
Re: [PATCH][RFC] fast file mapping for loop, Chris Mason, (Mon Jan 14, 10:10 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Mon Jan 14, 10:54 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Tue Jan 15, 2:25 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Tue Jan 15, 2:36 am)
Re: [PATCH][RFC] fast file mapping for loop, Jens Axboe, (Tue Jan 15, 3:07 am)
Re: [PATCH][RFC] fast file mapping for loop, Chris Mason, (Tue Jan 15, 7:04 am)