[Devel] [PATCH] fuse kio: Add comment about why we need to wait pending read requests
Kirill Tkhai
ktkhai at virtuozzo.com
Tue Oct 23 13:01:10 MSK 2018
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 3940d6c255ba..9b45fcbf8941 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -1081,7 +1081,12 @@ static void pcs_kio_setattr_handle(struct fuse_inode *fi, struct fuse_req *req)
r->end = req->end;
if (di->size.op == PCS_SIZE_SHRINK) {
BUG_ON(!mutex_is_locked(&req->io_inode->i_mutex));
- /* wait for aio reads in flight */
+ /*
+ * Wait for already submitted aio reads. Further reads
+ * (including already queued to bg_queue) will be stopped
+ * by wait_shrink(), and they will be processed from
+ * _pcs_shrink_end().
+ */
inode_dio_wait(req->io_inode);
/*
* Writebackcache was flushed already so it is safe to
More information about the Devel
mailing list