#include <linux/module.h>
#include <linux/types.h>
-#include <linux/random.h>
#include <linux/version.h>
#include <linux/mm.h>
cfs_list_add_tail(&sbi->ll_list, &ll_super_blocks);
cfs_spin_unlock(&ll_sb_lock);
-#ifdef ENABLE_LLITE_CHECKSUM
+#ifdef ENABLE_CHECKSUM
sbi->ll_flags |= LL_SBI_CHECKSUM;
#endif
CDEBUG(D_SUPER, "rootfid "DFID"\n", PFID(&sbi->ll_root_fid));
sb->s_op = &lustre_super_operations;
+#if THREAD_SIZE >= 8192
sb->s_export_op = &lustre_export_operations;
+#endif
/* make root inode
* XXX: move this to after cbd setup? */
*flags |= tmp;
goto next;
}
+ tmp = ll_set_opt("32bitapi", s1, LL_SBI_32BIT_API);
+ if (tmp) {
+ *flags |= tmp;
+ goto next;
+ }
LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
s1);
if (ia_valid & ATTR_SIZE)
attr->ia_valid |= ATTR_SIZE;
- if ((ia_valid & ATTR_SIZE) |
- ((ia_valid | ATTR_ATIME | ATTR_ATIME_SET) &&
- LTIME_S(attr->ia_atime) < LTIME_S(attr->ia_ctime)) ||
- ((ia_valid | ATTR_MTIME | ATTR_MTIME_SET) &&
- LTIME_S(attr->ia_mtime) < LTIME_S(attr->ia_ctime)))
- /* perform truncate and setting mtime/atime to past under PW
- * 0:EOF extent lock (new_size:EOF for truncate) */
+ if ((ia_valid & ATTR_SIZE) ||
+ (ia_valid | ATTR_ATIME | ATTR_ATIME_SET) ||
+ (ia_valid | ATTR_MTIME | ATTR_MTIME_SET))
+ /* on truncate and utimes send attributes to osts, setting
+ * mtime/atime to past will be performed under PW 0:EOF extent
+ * lock (new_size:EOF for truncate)
+ * it may seem excessive to send mtime/atime updates to osts
+ * when not setting times to past, but it is necessary due to
+ * possible time de-synchronization */
rc = ll_setattr_ost(inode, attr);
EXIT;
out:
/* Use old size assignment to avoid
* deadlock bz14138 & bz14326 */
inode->i_size = body->size;
+
+ CDEBUG(D_VFSTRACE, "inode=%lu, updating i_size %llu\n",
+ inode->i_ino, (unsigned long long)body->size);
}
if (body->valid & OBD_MD_FLBLOCKS)
RETURN(0);
}
+
+int ll_sync_fs(struct super_block *sb, int wait)
+{
+ struct ll_sb_info *sbi = ll_s2sbi(sb);
+ int rc = 0;
+ ENTRY;
+
+ rc = obd_sync_fs(class_exp2obd(sbi->ll_dt_exp), NULL, wait);
+ if (rc)
+ CERROR("sync_fs fails: rc = %d\n", rc);
+
+ RETURN(rc);
+}