linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] btrfs iomap support
@ 2017-11-17 17:44 Goldwyn Rodrigues
  2017-11-17 17:44 ` [RFC PATCH 1/8] btrfs: use iocb for __btrfs_buffered_write Goldwyn Rodrigues
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Goldwyn Rodrigues @ 2017-11-17 17:44 UTC (permalink / raw)
  To: linux-btrfs

This patch series attempts to use kernels iomap for btrfs. Currently,
it covers buffered writes only, but I intend to add some other iomap
uses once this gets through. I am sending this as an RFC because I
would like to find ways to improve the solution since some changes
require adding more functions to the iomap infrastructure which I
would try to avoid. I still have to remove some kinks as well such
as -o compress. I have posted some questions in the individual
patches and would appreciate some input to those.

Some of the problems I faced is:

1. extent locking: While we perform the extent locking for writes,
we need to perform any reads because of non-page-aligned calls before
locking can be done. This requires reading the page, increasing their
pagecount and "letting it go". The iomap infrastructure uses
buffer_heads wheras btrfs uses bio and hence needs to call readpage
exclusively. The "letting it go" part makes me somewhat nervous of
conflicting reads/writes, even though we are protected under i_rwsem.
Is readpage_nolock() a good idea? The extent locking sequence is a
bit weird, with locks and unlock happening in different functions.

2. btrfs pages use PagePrivate to store EXTENT_PAGE_PRIVATE which is not used anywhere.
However, a PagePrivate flag is used for try_to_release_buffers(). Can
we do away with PagePrivate for data pages? The same with PageChecked.
How and why is it used (I guess -o compress)

3. I had to stick information which will be required from iomap_begin()
to iomap_end() in btrfs_iomap which is a pointer in btrfs_inode. Is
there any other place/way we can transmit this information. XFS only
performs allocations and deallocations so it just relies of bmap code
for it.

Suggestions/Criticism welcome.

-- 
Goldwyn



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-05-22 10:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 17:44 [RFC PATCH 0/8] btrfs iomap support Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 1/8] btrfs: use iocb for __btrfs_buffered_write Goldwyn Rodrigues
2018-04-10 16:19   ` David Sterba
2018-05-22  6:40   ` Misono Tomohiro
2018-05-22 10:03     ` David Sterba
2017-11-17 17:44 ` [RFC PATCH 2/8] fs: Add inode_extend_page() Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 3/8] fs: Introduce IOMAP_F_NOBH Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 4/8] btrfs: Introduce btrfs_iomap Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 5/8] btrfs: use iomap to perform buffered writes Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 6/8] btrfs: read the first/last page of the write Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 7/8] fs: iomap->prepare_pages() to set directives specific for the page Goldwyn Rodrigues
2017-11-17 17:44 ` Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 8/8] fs: Introduce iomap->dirty_page() Goldwyn Rodrigues
2017-11-17 17:44 ` [RFC PATCH 8/8] iomap: " Goldwyn Rodrigues
2017-11-17 18:45 ` [RFC PATCH 0/8] btrfs iomap support Nikolay Borisov
2017-11-17 23:07   ` Goldwyn Rodrigues

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).