X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_disk.h;h=04caa8103908ea89c8b7bf48d0172247b6680a18;hb=9d9b3fa84a5fafe7ea0906b5cdae3be119a62b25;hp=69baf77d7f0da9001a7f19bdbf395a3f9a3e989a;hpb=4c1c3b4d33c85216b8d50264b8ba8101173e2698;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_disk.h b/lustre/include/lustre_disk.h index 69baf77..04caa81 100644 --- a/lustre/include/lustre_disk.h +++ b/lustre/include/lustre_disk.h @@ -43,6 +43,11 @@ #ifndef _LUSTRE_DISK_H #define _LUSTRE_DISK_H +/** \defgroup disk disk + * + * @{ + */ + #include #include @@ -172,6 +177,8 @@ struct lustre_mount_data { __u32 lmd_flags; /* lustre mount flags */ int lmd_mgs_failnodes; /* mgs failover node count */ int lmd_exclude_count; + int lmd_recovery_time_soft; + int lmd_recovery_time_hard; char *lmd_dev; /* device name */ char *lmd_profile; /* client only */ char *lmd_mgssec; /* sptlrpc flavor to mgs */ @@ -217,8 +224,6 @@ struct lustre_mount_data { #define LR_MAX_CLIENTS (CFS_PAGE_SIZE * 8) #endif -#define LR_CLIENT_BITMAP_SIZE ((LR_MAX_CLIENTS >> 3) / sizeof(long)) - /** COMPAT_146: this is an OST (temporary) */ #define OBD_COMPAT_OST 0x00000002 /** COMPAT_146: this is an MDT (temporary) */ @@ -295,6 +300,20 @@ struct lsd_client_data { __u8 lcd_padding[LR_CLIENT_SIZE - 128]; }; +/* bug20354: the lcd_uuid for export of clients may be wrong */ +static inline void check_lcd(char *obd_name, int index, + struct lsd_client_data *lcd) +{ + int length = sizeof(lcd->lcd_uuid); + if (strnlen((char*)lcd->lcd_uuid, length) == length) { + lcd->lcd_uuid[length - 1] = '\0'; + + LCONSOLE_ERROR("the client UUID (%s) on %s for exports" + "stored in last_rcvd(index = %d) is bad!\n", + lcd->lcd_uuid, obd_name, index); + } +} + /* last_rcvd handling */ static inline void lsd_le_to_cpu(struct lr_server_data *buf, struct lr_server_data *lsd) @@ -414,7 +433,7 @@ struct lustre_sb_info { struct lustre_disk_data *lsi_ldd; /* mount info on-disk */ struct ll_sb_info *lsi_llsbi; /* add'l client sbi info */ struct vfsmount *lsi_srv_mnt; /* the one server mount */ - atomic_t lsi_mounts; /* references to the srv_mnt */ + cfs_atomic_t lsi_mounts; /* references to the srv_mnt */ }; #define LSI_SERVER 0x00000001 @@ -431,10 +450,10 @@ struct lustre_sb_info { /****************** mount lookup info *********************/ struct lustre_mount_info { - char *lmi_name; - struct super_block *lmi_sb; - struct vfsmount *lmi_mnt; - struct list_head lmi_list_chain; + char *lmi_name; + struct super_block *lmi_sb; + struct vfsmount *lmi_mnt; + cfs_list_t lmi_list_chain; }; /****************** prototypes *********************/ @@ -447,6 +466,7 @@ void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb)); int lustre_common_put_super(struct super_block *sb); +struct lustre_mount_info *server_find_mount_locked(const char *name); struct lustre_mount_info *server_get_mount(const char *name); struct lustre_mount_info *server_get_mount_2(const char *name); int server_put_mount(const char *name, struct vfsmount *mnt); @@ -460,4 +480,6 @@ int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id); #endif +/** @} disk */ + #endif // _LUSTRE_DISK_H