On Tue, Apr 30, 2019 at 12:09:29AM +0200, Andreas Gruenbacher wrote:
> Here's another update of this patch queue, hopefully with all wrinkles
> ironed out now.
>
> Darrick, I think Linus would be unhappy seeing the first four patches in
> the gfs2 tree; could you put them into the xfs tree
The VFS-internal __generic_write_end helper always returns the value of
its @copied argument. This can be confusing, and it isn't very useful
anyway, so turn __generic_write_end into a function returning void
instead.
Signed-off-by: Andreas Gruenbacher
---
fs/buffer.c | 6 +++---
Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing
buffered writes by starting a transaction in iomap_begin, writing a range of
pages, and ending that transaction in iomap_end. This approach suffers from
two problems:
(1) Any allocations necessary for the write are
Move the page_done callback into a separate iomap_page_ops structure and
add a page_prepare calback to be called before the next page is written
to. In gfs2, we'll want to start a transaction in page_prepare and end
it in page_done. Other filesystems that implement data journaling will
require
In iomap_write_end, we're not holding a page reference anymore when
calling the page_done callback, but the callback needs that reference to
access the page. To fix that, move the put_page call in
__generic_write_end into the callers of __generic_write_end. Then, in
iomap_write_end, put the page
From: Christoph Hellwig
Move the call to __generic_write_end into iomap_write_end instead of
duplicating it in each of the three branches. This requires open coding
the generic_write_end for the buffer_head case.
Signed-off-by: Christoph Hellwig
Signed-off-by: Andreas Gruenbacher
Here's another update of this patch queue, hopefully with all wrinkles
ironed out now.
Darrick, I think Linus would be unhappy seeing the first four patches in
the gfs2 tree; could you put them into the xfs tree instead like we did
some time ago already?
Thanks,
Andreas
Andreas Gruenbacher (4):
On Mon 29-04-19 18:32:36, Andreas Gruenbacher wrote:
> From: Christoph Hellwig
>
> Move the call to __generic_write_end into iomap_write_end instead of
> duplicating it in each of the three branches. This requires open coding
> the generic_write_end for the buffer_head case.
>
> Signed-off-by:
On Mon 29-04-19 18:32:38, Andreas Gruenbacher wrote:
> Move the page_done callback into a separate iomap_page_ops structure and
> add a page_prepare calback to be called before the next page is written
> to. In gfs2, we'll want to start a transaction in page_prepare and end
> it in page_done.
> +static int gfs2_iomap_page_prepare(struct inode *inode, loff_t pos,
> +unsigned len, struct iomap *iomap)
> +{
> + return 0;
> +}
Now that we check for each callback there is no need to add a dummy
one in this patch.
But given that that won't change the end
Or we could merge the dropping of the __generic_write_end return
value into this one if you prefer.
Either way:
Reviewed-by: Christoph Hellwig
On Mon, Apr 29, 2019 at 07:46:29PM +0200, Andreas Gruenbacher wrote:
> On Mon, 29 Apr 2019 at 18:32, Andreas Gruenbacher wrote:
> > From: Christoph Hellwig
> >
> > Move the call to __generic_write_end into iomap_write_end instead of
> > duplicating it in each of the three branches. This
Move the page_done callback into a separate iomap_page_ops structure and
add a page_prepare calback to be called before the next page is written
to. In gfs2, we'll want to start a transaction in page_prepare and end
it in page_done. Other filesystems that implement data journaling will
require
In iomap_write_end, we're not holding a page reference anymore when
calling the page_done callback, but the callback needs that reference to
access the page. To fix that, move the put_page call in
__generic_write_end into the callers of __generic_write_end. Then, in
iomap_write_end, put the page
Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing
buffered writes by starting a transaction in iomap_begin, writing a range of
pages, and ending that transaction in iomap_end. This approach suffers from
two problems:
(1) Any allocations necessary for the write are
From: Christoph Hellwig
Move the call to __generic_write_end into iomap_write_end instead of
duplicating it in each of the three branches. This requires open coding
the generic_write_end for the buffer_head case.
Signed-off-by: Christoph Hellwig
Signed-off-by: Andreas Gruenbacher
---
On Fri 26-04-19 15:11:25, Andreas Gruenbacher wrote:
> In iomap_write_end, we are not holding a page reference anymore when
> calling the page_done callback, but the callback needs that reference to
> access the page.
>
> To fix that, move the put_page call in __generic_write_end into the
>
17 matches
Mail list logo