diff options
author | Sachin Bhamare <sbhamare@panasas.com> | 2012-03-14 21:01:45 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2012-05-21 05:24:01 -0400 |
commit | 8b56a30caaf9bc1850784f196636c5f550cc7577 (patch) | |
tree | 0e1be3d4f929a385c666fd7b269763f59fe215e5 /fs/exofs/exofs.h | |
parent | 6abe4a87f7bc7978705c386dbba0ca0c7790b3ec (diff) |
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>
Diffstat (limited to 'fs/exofs/exofs.h')
-rw-r--r-- | fs/exofs/exofs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h index ca9d49665ef..fffe86fd7a4 100644 --- a/fs/exofs/exofs.h +++ b/fs/exofs/exofs.h | |||
@@ -56,6 +56,9 @@ | |||
56 | struct exofs_dev { | 56 | struct exofs_dev { |
57 | struct ore_dev ored; | 57 | struct ore_dev ored; |
58 | unsigned did; | 58 | unsigned did; |
59 | unsigned urilen; | ||
60 | uint8_t *uri; | ||
61 | struct kobject ed_kobj; | ||
59 | }; | 62 | }; |
60 | /* | 63 | /* |
61 | * our extension to the in-memory superblock | 64 | * our extension to the in-memory superblock |
@@ -73,6 +76,7 @@ struct exofs_sb_info { | |||
73 | struct ore_layout layout; /* Default files layout */ | 76 | struct ore_layout layout; /* Default files layout */ |
74 | struct ore_comp one_comp; /* id & cred of partition id=0*/ | 77 | struct ore_comp one_comp; /* id & cred of partition id=0*/ |
75 | struct ore_components oc; /* comps for the partition */ | 78 | struct ore_components oc; /* comps for the partition */ |
79 | struct kobject s_kobj; /* holds per-sbi kobject */ | ||
76 | }; | 80 | }; |
77 | 81 | ||
78 | /* | 82 | /* |
@@ -176,6 +180,16 @@ void exofs_make_credential(u8 cred_a[OSD_CAP_LEN], | |||
176 | const struct osd_obj_id *obj); | 180 | const struct osd_obj_id *obj); |
177 | int exofs_sbi_write_stats(struct exofs_sb_info *sbi); | 181 | int exofs_sbi_write_stats(struct exofs_sb_info *sbi); |
178 | 182 | ||
183 | /* sys.c */ | ||
184 | int exofs_sysfs_init(void); | ||
185 | void exofs_sysfs_uninit(void); | ||
186 | int exofs_sysfs_sb_add(struct exofs_sb_info *sbi, | ||
187 | struct exofs_dt_device_info *dt_dev); | ||
188 | void exofs_sysfs_sb_del(struct exofs_sb_info *sbi); | ||
189 | int exofs_sysfs_odev_add(struct exofs_dev *edev, | ||
190 | struct exofs_sb_info *sbi); | ||
191 | void exofs_sysfs_dbg_print(void); | ||
192 | |||
179 | /********************* | 193 | /********************* |
180 | * operation vectors * | 194 | * operation vectors * |
181 | *********************/ | 195 | *********************/ |