Mostly for writing test for hunting [0].
[0]: https://tracker.ceph.com/issues/71510
Signed-off-by: Venky Shankar <vshankar@redhat.com>
state->advance();
}
-void Client::nonblocking_fsync(Inode *in, bool syncdataonly, Context *onfinish)
+int64_t Client::nonblocking_fsync(Inode *in, bool syncdataonly, Context *onfinish)
{
C_nonblocking_fsync_state *state = new C_nonblocking_fsync_state(this, in, syncdataonly, onfinish);
+ ldout(cct, 10) << __func__ << dendl;
+
+ std::unique_lock cl(client_lock);
// Kick fsync off...
state->advance();
+ return 0;
}
int Client::_fsync(Inode *in, bool syncdataonly)
Context *onfinish = nullptr,
bufferlist *blp = nullptr,
bool do_fsync = false, bool syncdataonly = false);
+ int64_t nonblocking_fsync(Inode *in, bool syncdataonly, Context *onfinish);
loff_t ll_lseek(Fh *fh, loff_t offset, int whence);
int ll_flush(Fh *fh);
int ll_fsync(Fh *fh, bool syncdataonly);
int64_t offset, bool write, Context *onfinish = nullptr,
bufferlist *blp = nullptr);
int _flush(Fh *fh);
- void nonblocking_fsync(Inode *in, bool syncdataonly, Context *onfinish);
+
int _fsync(Fh *fh, bool syncdataonly);
int _fsync(Inode *in, bool syncdataonly);
int _sync_fs();
const struct iovec *iov, int iovcnt, int64_t off);
int64_t ceph_ll_nonblocking_readv_writev(struct ceph_mount_info *cmount,
struct ceph_ll_io_info *io_info);
+int64_t ceph_ll_nonblocking_fsync(struct ceph_mount_info *cmount,
+ Inode *in, struct ceph_ll_io_info *io_info);
int ceph_ll_close(struct ceph_mount_info *cmount, struct Fh* filehandle);
int ceph_ll_iclose(struct ceph_mount_info *cmount, struct Inode *in, int mode);
/**
}
};
+extern "C" int64_t ceph_ll_nonblocking_fsync(class ceph_mount_info *cmount,
+ Inode *in, struct ceph_ll_io_info *io_info)
+{
+ LL_Onfinish *onfinish = new LL_Onfinish(io_info);
+
+ return (cmount->get_client()->nonblocking_fsync(
+ in, io_info->syncdataonly, onfinish));
+}
+
extern "C" int64_t ceph_ll_nonblocking_readv_writev(class ceph_mount_info *cmount,
struct ceph_ll_io_info *io_info)
{