[lkml]   [2019]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RFC] fuse: Prevent background write requests increase inode size
On Tue, Nov 6, 2018 at 3:03 PM Kirill Tkhai <> wrote:
> Hi, Miklos,
> this is not a well-tested patch, this is a concept,
> showing the places, where it looks we have a problem.
> Commit 7879c4e58b7c made io->async careless about inode size,
> and this is wrong. Asyncronuos background requests may be sent
> to userspace after inode becomes unlocked, when background
> queue is throttled. In this case we execute a write request
> extending inode size without any protection, and this ruines
> everything. Fix that.
> Also, some write background requests do not increment fi->writectr,
> e.g.:
> fuse_direct_IO()
> fuse_direct_io()
> fuse_send_write()
> fuse_async_req_send()
> fuse_request_send_background()

inode_lock should prevent mischief for sync DIO. For AIO DIO the
order of operations is not deterministic, so it's fine if truncate and
an extending AIO write race, as far as I understand.


 \ /
  Last update: 2019-01-23 10:39    [W:0.034 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site