f2fs async buffered write patch
Hi,
I came across this patch in a news posting:
which has me a bit worried. As far as I can tell, all that patch does is set FMODE_BUF_WASYNC, and then just hope that the lower layers handle the rest?
What happens if iocb->ki_flags & IOCB_NOWAIT is true, and now we do:
generic_perform_write(iocb, from)
... ->write_begin() <- does this block? ... ->write_end() <- or this one? ... balance_dirty_pages_ratelimited() <- this one surely does...
If you look just one level down the latter to balance_dirty_pages_ratelimited_flags(), you'll even see the 'flags' argument documented there.
This looks pretty haphazard and cannot possibly work as-is, so please get this reverted until f2fs is converted to iomap, or IOCB_NOWAIT is handled by generic_perform_write() and below.
Signature · 1 line
Jens Axboe
Quoted 20 lines · Jens Axboe
Hi,
I came across this patch in a news posting:
which has me a bit worried. As far as I can tell, all that patch does is set
FMODE_BUF_WASYNC, and then just hope that the lower layers handle the rest?What happens if
iocb->ki_flags&IOCB_NOWAITis true, and now we do:
generic_perform_write(iocb, from)... ->write_begin() <- does this block? ... ->write_end() <- or this one? ... balance_dirty_pages_ratelimited() <- this one surely does...
Quoted 7 lines
If you look just one level down the latter to
balance_dirty_pages_ratelimited_flags(), you'll even see the 'flags' argument documented there.This looks pretty haphazard and cannot possibly work as-is, so please get this reverted until f2fs is converted to iomap, or
IOCB_NOWAITis handled bygeneric_perform_write()and below.
Thank you for pointing that out. It seems I haven't reviewed it carefully. Hence I removed it from -next, and hope to have some time to convert iomap soon.
Thanks,
Quoted 3 lines
Signature · 2 lines
-- Jens Axboe
Quoted 25 lines · Jaegeuk Kim
Quoted 24 lines · Jens Axboe
Hi,
I came across this patch in a news posting:
which has me a bit worried. As far as I can tell, all that patch does is set
FMODE_BUF_WASYNC, and then just hope that the lower layers handle the rest?What happens if
iocb->ki_flags&IOCB_NOWAITis true, and now we do:
generic_perform_write(iocb, from)... ->write_begin() <- does this block? ... ->write_end() <- or this one? ... balance_dirty_pages_ratelimited() <- this one surely does...If you look just one level down the latter to
balance_dirty_pages_ratelimited_flags(), you'll even see the 'flags' argument documented there.
Quoted 7 lines
Quoted 3 lines
This looks pretty haphazard and cannot possibly work as-is, so please get this reverted until f2fs is converted to iomap, or
IOCB_NOWAITis handled bygeneric_perform_write()and below.Thank you for pointing that out. It seems I haven't reviewed it carefully. Hence I removed it from -next, and hope to have some time to convert iomap soon.
Thanks - would be great to get FMODE_BUF_WASYNC enabled obviously, just needs a bit more work to get there.
Signature · 1 line
Jens Axboe
Quoted 10 lines · Jens Axboe
Hi,
I came across this patch in a news posting:
which has me a bit worried. As far as I can tell, all that patch does is set
FMODE_BUF_WASYNC, and then just hope that the lower layers handle the rest?
Quoted 5 lines
What happens if
iocb->ki_flags&IOCB_NOWAITis true, and now we do:
generic_perform_write(iocb, from)... ->write_begin() <- does this block?
Most file systems have not been changed to the iomap method,
and the generic_perform_write method is still used. So it seems
reasonable to make IOCB_NOWAIT be handled correctly by the
generic_perform_write function. This means that we need to modify
several places mentioned by Jens in the generic_perform_write function,
and need to pass AOP_FLAG_xxx or iocb into write_begin.
I noticed that Matthew Wilcox removed the flags parameter in write_begin
in a previous commit, maybe we can add it back?
Thx
Quoted 13 lines
... ->write_end() <- or this one? ... balance_dirty_pages_ratelimited() <- this one surely does...If you look just one level down the latter to
balance_dirty_pages_ratelimited_flags(), you'll even see the 'flags' argument documented there.This looks pretty haphazard and cannot possibly work as-is, so please get this reverted until f2fs is converted to iomap, or
IOCB_NOWAITis handled bygeneric_perform_write()and below.
Quoted 15 lines · Yangtao Li
Quoted 10 lines · Jens Axboe
Hi,
I came across this patch in a news posting:
which has me a bit worried. As far as I can tell, all that patch does is set
FMODE_BUF_WASYNC, and then just hope that the lower layers handle the rest?
Quoted 7 lines
Quoted 5 lines
What happens if
iocb->ki_flags&IOCB_NOWAITis true, and now we do:
generic_perform_write(iocb, from)... ->write_begin() <- does this block?Most file systems have not been changed to the iomap method,
That's what needs to be fixed.
Quoted 5 lines
and the
generic_perform_writemethod is still used. So it seemsreasonable to make
IOCB_NOWAITbe handled correctly by thegeneric_perform_write function. This means that we need to modify
No. Use the modern infrastructure.
Quoted 3 lines
several places mentioned by Jens in the
generic_perform_writefunction,and need to pass
AOP_FLAG_xxxor iocb intowrite_begin.
Definitely not.
Quoted 4 lines
I noticed that Matthew Wilcox removed the flags parameter in
write_beginin a previous commit, maybe we can add it back?
No.
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel