From 708b4818f2d0b9a1e277de85a00a0355745a5cd0 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sat, 30 Sep 2006 16:02:25 +0000 Subject: bmap support --- include/fuse_lowlevel.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'include/fuse_lowlevel.h') diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 00b22bc..83e9739 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -733,6 +733,8 @@ struct fuse_lowlevel_ops { /** * Test for a POSIX file lock * + * Introduced in version 2.6 + * * Valid replies: * fuse_reply_lock * fuse_reply_err @@ -759,6 +761,8 @@ struct fuse_lowlevel_ops { * will still allow file locking to work locally. Hence these are * only interesting for network filesystems and similar. * + * Introduced in version 2.6 + * * Valid replies: * fuse_reply_err * @@ -771,6 +775,26 @@ struct fuse_lowlevel_ops { */ void (*setlk) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, struct flock *lock, uint64_t owner, int sleep); + + /** + * Map block index within file to block index within device + * + * Note: This makes sense only for block device backed filesystems + * mounted with the 'blkdev' option + * + * Introduced in version 2.6 + * + * Valid replies: + * fuse_reply_bmap + * fuse_reply_err + * + * @param req request handle + * @param ino the inode number + * @param blocksize unit of block index + * @param idx block index within file + */ + void (*bmap) (fuse_req_t req, fuse_ino_t ino, size_t blocksize, + uint64_t idx); }; /** @@ -929,6 +953,18 @@ int fuse_reply_xattr(fuse_req_t req, size_t count); */ int fuse_reply_lock(fuse_req_t req, struct flock *lock); +/** + * Reply with block index + * + * Possible requests: + * bmap + * + * @param req request handle + * @param idx block index within device + * @return zero for success, -errno for failure to send reply + */ +int fuse_reply_bmap(fuse_req_t req, uint64_t idx); + /* ----------------------------------------------------------- * * Filling a buffer in readdir * * ----------------------------------------------------------- */ -- cgit v1.2.3