]) # LC_HAVE_IOP_ATOMIC_OPEN
#
+# LC_HAVE_SB_START_WRITE
+#
+# RHEL6 2.6.32, 3.6 or newer support wrapped FS freeze functions
+#
+AC_DEFUN([LC_HAVE_SB_START_WRITE], [
+LB_CHECK_COMPILE([if kernel supports wrapped FS freeze functions],
+sb_start_write, [
+ #include <linux/fs.h>
+],[
+ sb_start_write(NULL);
+],[
+ AC_DEFINE(HAVE_SB_START_WRITE, 1,
+ [kernel supports wrapped FS freeze functions])
+])
+]) # LC_HAVE_SB_START_WRITE
+
+#
# LC_HAVE_POSIXACL_USER_NS
#
# 3.7 posix_acl_{to,from}_xattr take struct user_namespace
LC_DATA_FOR_LLITE_IS_LIST
LC_DENTRY_OPEN_USE_PATH
LC_HAVE_IOP_ATOMIC_OPEN
+ LC_HAVE_SB_START_WRITE
# 3.7
LC_HAVE_POSIXACL_USER_NS
OBD_FREE_PTR(oh);
}
+#ifndef HAVE_SB_START_WRITE
+# define sb_start_write(sb) do {} while (0)
+# define sb_end_write(sb) do {} while (0)
+#endif
+
static struct thandle *osd_trans_create(const struct lu_env *env,
struct dt_device *d)
{
/* on pending IO in this thread should left from prev. request */
LASSERT(atomic_read(&iobuf->dr_numreqs) == 0);
- th = ERR_PTR(-ENOMEM);
+ sb_start_write(osd_sb(osd_dt_dev(d)));
+
OBD_ALLOC_GFP(oh, sizeof *oh, GFP_NOFS);
if (oh != NULL) {
oh->ot_quota_trans = &oti->oti_quota_trans;
sizeof(oti->oti_declare_ops_cred));
memset(oti->oti_declare_ops_used, 0,
sizeof(oti->oti_declare_ops_used));
+ } else {
+ sb_end_write(osd_sb(osd_dt_dev(d)));
+ th = ERR_PTR(-ENOMEM);
}
RETURN(th);
}
if (unlikely(remove_agents != 0))
osd_process_scheduled_agent_removals(env, osd);
+ sb_end_write(osd_sb(osd));
+
RETURN(rc);
}