Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Tue, 27 Sep 2005 22:16:07 +0000 (22:16 +0000)
committeradilger <adilger>
Tue, 27 Sep 2005 22:16:07 +0000 (22:16 +0000)
Lustre fixes for compiling against a 2.6.12 kernel from Bull.
b=6864

lustre/llite/llite_lib.c
lustre/llite/super.c

index ae91803..1f9ed45 100644 (file)
@@ -133,7 +133,6 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc)
         struct lustre_handle mdc_conn = {0, };
         struct lustre_md md;
         struct obd_connect_data *data = NULL;
-        kdev_t devno;
         int err;
         ENTRY;
 
@@ -186,10 +185,15 @@ int lustre_common_fill_super(struct super_block *sb, char *mdc, char *osc)
         sb->s_maxbytes = PAGE_CACHE_MAXBYTES;
         sbi->ll_namelen = osfs.os_namelen;
 
-        devno = get_uuid2int(sbi2mdc(sbi)->cl_import->imp_target_uuid.uuid,
-                             strlen(sbi2mdc(sbi)->cl_import->imp_target_uuid.uuid));
-        /* s_dev is also used in lt_compare() to compare two fs */
-        sb->s_dev = devno;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+        /* We set sb->s_dev equal on all lustre clients in order to support
+         * NFS export clustering.  NFSD requires that the FSID be the same
+         * on all clients. */
+        /* s_dev is also used in lt_compare() to compare two fs, but that is
+         * only a node-local comparison. */
+        sb->s_dev = get_uuid2int(sbi2mdc(sbi)->cl_import->imp_target_uuid.uuid,
+                         strlen(sbi2mdc(sbi)->cl_import->imp_target_uuid.uuid));
+#endif
 
         obd = class_name2obd(osc);
         if (!obd) {
@@ -1288,7 +1292,11 @@ void ll_update_inode(struct inode *inode, struct mds_body *body,
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 static struct backing_dev_info ll_backing_dev_info = {
         .ra_pages       = 0,    /* No readahead */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
+        .capabilities   = 0,    /* Does contribute to dirty memory */
+#else
         .memory_backed  = 0,    /* Does contribute to dirty memory */
+#endif
 };
 #endif
 
index dbf1b20..c96621e 100644 (file)
@@ -74,7 +74,6 @@ struct super_operations lustre_super_operations =
 {
         .read_inode2    = ll_read_inode2,
         .clear_inode    = ll_clear_inode,
-//        .delete_inode   = ll_delete_inode,
         .put_super      = lustre_put_super,
         .statfs         = ll_statfs,
         .umount_begin   = ll_umount_begin,