*/
#ifdef HAVE_FILE_FSYNC_4ARGS
-int ll_fsync(struct file *file, loff_t start, loff_t end, int data)
+int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{
struct dentry *dentry = file->f_dentry;
#elif defined(HAVE_FILE_FSYNC_2ARGS)
-int ll_fsync(struct file *file, int data)
+int ll_fsync(struct file *file, int datasync)
{
struct dentry *dentry = file->f_dentry;
#else
-int ll_fsync(struct file *file, struct dentry *dentry, int data)
+int ll_fsync(struct file *file, struct dentry *dentry, int datasync)
{
#endif
struct inode *inode = dentry->d_inode;
if (!err)
ptlrpc_req_finished(req);
- if (data) {
+ if (datasync && S_ISREG(inode->i_mode)) {
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
err = cl_sync_file_range(inode, 0, OBD_OBJECT_EOF,
}
run_test 118l "fsync dir ========="
+test_118m() # LU-3066
+{
+ [ $PARALLEL == "yes" ] && skip "skip parallel run" && return
+ test_mkdir -p $DIR/$tdir
+ $MULTIOP $DIR/$tdir DY || error "fdatasync dir failed"
+ rm -rf $DIR/$tdir
+}
+run_test 118m "fdatasync dir ========="
+
[ "$SLOW" = "no" ] && [ -n "$OLD_RESENDCOUNT" ] && set_resend_count $OLD_RESENDCOUNT
test_119a() # bug 11737