[RHEL7,COMMIT] fs/fuse kio_pcs: add handling FUSE_FLUSH in kio_pcs

Submitted by Konstantin Khorenko on June 28, 2018, 2:58 p.m.

Details

Message ID 201806281458.w5SEwgDo020454@finist_ce7.work
State New
Series "fs/fuse kio_pcs: add handling FUSE_FLUSH in kio_pcs"
Headers show

Commit Message

Konstantin Khorenko June 28, 2018, 2:58 p.m.
The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.6
------>
commit 427fedb2170fa854195e9150bc3f5188cbbdbc96
Author: Pavel Butsykin <pbutsykin@virtuozzo.com>
Date:   Thu Jun 28 17:58:42 2018 +0300

    fs/fuse kio_pcs: add handling FUSE_FLUSH in kio_pcs
    
    To implement kio flush we need to wait for all pending write ireq/sreq and send
    PCS_CS_SYNC_REQ to all cs_list's. The first is already done in fuse_flush() by
    calling fuse_sync_writes()->fuse_set_nowrite()->inode_dio_wait(). The second is
    already implemented in PCS_REQ_T_SYNC that re-uses this patch.
    
    Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
    Acked-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
    
    ==================================================
    Pathset description:
    [PATCH 0/2] Add flush() request handling in fast-path
    
    https://pmc.acronis.com/browse/VSTOR-11064
    
    Pavel Butsykin (2):
      fs/fuse: set inode entry for FUSE_FLUSH request
      fs/fuse kio_pcs: add handling FUSE_FLUSH in kio_pcs
---
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 5091eb04c0e0..509526dc534b 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -916,6 +916,7 @@  static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 		break;
 	}
 	case FUSE_FSYNC:
+	case FUSE_FLUSH:
 		pcs_fuse_prep_io(r, PCS_REQ_T_SYNC, 0, 0, 0);
 		goto submit;
 	case FUSE_IOCTL: {
@@ -1072,6 +1073,7 @@  static int kpcs_req_send(struct fuse_conn* fc, struct fuse_req *req, bool bg, bo
 	case FUSE_READ:
 	case FUSE_WRITE:
 	case FUSE_FSYNC:
+	case FUSE_FLUSH:
 	case FUSE_FALLOCATE:
 		break;
 	case FUSE_IOCTL: {