X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Ffs%2Ffuse%2Ffuse_i.h;fp=kernel%2Ffs%2Ffuse%2Ffuse_i.h;h=604cd42dafef2a41941febd3681699f35cdb5e52;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hp=405113101db8d868fcb40c34199978be576d0961;hpb=c189ccac5702322ed843fe17057035b7222a59b6;p=kvmfornfv.git diff --git a/kernel/fs/fuse/fuse_i.h b/kernel/fs/fuse/fuse_i.h index 405113101..604cd42da 100644 --- a/kernel/fs/fuse/fuse_i.h +++ b/kernel/fs/fuse/fuse_i.h @@ -22,6 +22,7 @@ #include #include #include +#include /** Max number of pages that can be used in a single read request */ #define FUSE_MAX_PAGES_PER_REQ 32 @@ -243,6 +244,7 @@ struct fuse_args { /** The request IO state (for asynchronous processing) */ struct fuse_io_priv { + struct kref refcnt; int async; spinlock_t lock; unsigned reqs; @@ -256,6 +258,13 @@ struct fuse_io_priv { struct completion *done; }; +#define FUSE_IO_PRIV_SYNC(f) \ +{ \ + .refcnt = { ATOMIC_INIT(1) }, \ + .async = 0, \ + .file = f, \ +} + /** * Request flags *