enum obd_statfs_state {
OS_STATE_DEGRADED = 0x00000001, /**< RAID degraded/rebuilding */
OS_STATE_READONLY = 0x00000002, /**< filesystem is read-only */
+ OS_STATE_NOPRECREATE = 0x00000004, /**< no object precreation */
OS_STATE_ENOSPC = 0x00000020, /**< not enough free space */
OS_STATE_ENOINO = 0x00000040, /**< not enough inodes */
};
ost = OST_TGT(lod, idx);
if (ost->ltd_statfs.os_state &
- (OS_STATE_READONLY | OS_STATE_ENOSPC | OS_STATE_ENOINO) ||
+ (OS_STATE_READONLY | OS_STATE_ENOSPC | OS_STATE_ENOINO |
+ OS_STATE_NOPRECREATE) ||
ost->ltd_active == 0) {
CDEBUG(D_LAYOUT, DFID ": mirror %d OST%d unavail, rc = %d\n",
PFID(lod_object_fid(lo)), index, idx, rc);
if (sfs->os_state & OS_STATE_READONLY)
rc = -EROFS;
+ /* object precreation is skipped on the OST with max_create_count=0 */
+ if (sfs->os_state & OS_STATE_NOPRECREATE)
+ rc = -ENOBUFS;
+
/* check whether device has changed state (active, inactive) */
if (rc != 0 && ost->ltd_active) {
/* turned inactive? */
available, d->opd_reserved_mb_low,
d->opd_pre_status, rc);
}
+
+ /* Object precreation is skipped on the OST with
+ * max_create_count=0. */
+ if (d->opd_pre_max_create_count == 0)
+ msfs->os_state |= OS_STATE_NOPRECREATE;
+ else
+ msfs->os_state &= ~OS_STATE_NOPRECREATE;
}
out:
wake_up(&d->opd_pre_user_waitq);