exofs: Add SYSFS info for autologin/pNFS export
Introduce sysfs infrastructure for exofs cluster filesystem. Each OSD target shows up as below in the sysfs hierarchy: /sys/fs/exofs/<osdname>_<partition_id>/devX Where <osdname>_<partition_id> is the unique identification of a Superblock. Where devX: 0 <= X < device_table_size. They are ordered in device-table order as specified to the mkfs.exofs command Each OSD device devX has following attributes : osdname - ReadOnly systemid - ReadOnly uri - Read/Write It is up to user-mode to update devX/uri for support of autologin. These sysfs information are used both for autologin as well as support for exporting exofs via a pNFSD server in user-mode. (.eg NFS-Ganesha) Signed-off-by: Sachin Bhamare <sbhamare@panasas.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
This commit is contained in:

committed by
Boaz Harrosh

parent
6abe4a87f7
commit
8b56a30caa
@@ -56,6 +56,9 @@
|
||||
struct exofs_dev {
|
||||
struct ore_dev ored;
|
||||
unsigned did;
|
||||
unsigned urilen;
|
||||
uint8_t *uri;
|
||||
struct kobject ed_kobj;
|
||||
};
|
||||
/*
|
||||
* our extension to the in-memory superblock
|
||||
@@ -73,6 +76,7 @@ struct exofs_sb_info {
|
||||
struct ore_layout layout; /* Default files layout */
|
||||
struct ore_comp one_comp; /* id & cred of partition id=0*/
|
||||
struct ore_components oc; /* comps for the partition */
|
||||
struct kobject s_kobj; /* holds per-sbi kobject */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -176,6 +180,16 @@ void exofs_make_credential(u8 cred_a[OSD_CAP_LEN],
|
||||
const struct osd_obj_id *obj);
|
||||
int exofs_sbi_write_stats(struct exofs_sb_info *sbi);
|
||||
|
||||
/* sys.c */
|
||||
int exofs_sysfs_init(void);
|
||||
void exofs_sysfs_uninit(void);
|
||||
int exofs_sysfs_sb_add(struct exofs_sb_info *sbi,
|
||||
struct exofs_dt_device_info *dt_dev);
|
||||
void exofs_sysfs_sb_del(struct exofs_sb_info *sbi);
|
||||
int exofs_sysfs_odev_add(struct exofs_dev *edev,
|
||||
struct exofs_sb_info *sbi);
|
||||
void exofs_sysfs_dbg_print(void);
|
||||
|
||||
/*********************
|
||||
* operation vectors *
|
||||
*********************/
|
||||
|
Reference in New Issue
Block a user