CID 716860: Unchecked return value (CHECKED_RETURN)
At (22): Calling function "ioctl(int, unsigned long, ...)" without checking return value (as is done elsewhere 30 out of 31 times).
Signed-off-by: Sage Weil <sage@inktank.com>
if (btrfs) {
dout(15) << "sync_entry doing btrfs SYNC" << dendl;
// do a full btrfs commit
- ::ioctl(op_fd, BTRFS_IOC_SYNC);
+ int r = ::ioctl(op_fd, BTRFS_IOC_SYNC);
+ if (r < 0) {
+ r = -errno;
+ derr << "sync_entry btrfs IOC_SYNC got " << cpp_strerror(r) << dendl;
+ assert(0 == "btrfs sync ioctl returned error");
+ }
} else
if (m_filestore_fsync_flushes_journal_data) {
dout(15) << "sync_entry doing fsync on " << current_op_seq_fn << dendl;