Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-21 Thread NeilBrown
On Mon, 20 Apr 2015 02:45:39 -0700 Christoph Hellwig h...@infradead.org wrote: On Mon, Apr 20, 2015 at 04:27:00PM +1000, NeilBrown wrote: A worthwhile goal, but I certainly wouldn't consider pursuing it until what I have submitted so far as been accepted - let's not reject good while

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread David Howells
NeilBrown ne...@suse.de wrote: @@ -721,24 +733,45 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op, We can actually do better than this what you've done here for cachefiles_read_or_alloc_pages(). We can use SEEK_DATA to check the beginning of a run of pages and then

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread Christoph Hellwig
On Mon, Apr 20, 2015 at 04:27:00PM +1000, NeilBrown wrote: A worthwhile goal, but I certainly wouldn't consider pursuing it until what I have submitted so far as been accepted - let's not reject good while waiting for perfect. It's still broken. You add conditional flag for the almost right

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread Christoph Hellwig
Please just usse SEEK_HOLE/DATA support unconditioanlly. -bmap is a horrible hack that is completely unsafe. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-20 Thread NeilBrown
On Sun, 19 Apr 2015 23:08:18 -0700 Christoph Hellwig h...@infradead.org wrote: Please just usse SEEK_HOLE/DATA support unconditioanlly. -bmap is a horrible hack that is completely unsafe. A worthwhile goal, but I certainly wouldn't consider pursuing it until what I have submitted so far as

[PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of -bmap.

2015-04-19 Thread NeilBrown
cachefiles currently uses 'bmap' to determine if a given block in a file has been cached, or not. Not all filesystems support bmap, particularly BTRFS. SEEK_DATA can be used to determine if a block in a file has been allocated, but not all filesystems support this reliably. On filesystems without