From 65122d3610c19b0eeedd6e6e25df0b53258ab803 Mon Sep 17 00:00:00 2001 From: rread Date: Tue, 11 Nov 2003 23:13:14 +0000 Subject: [PATCH] Add new "lustre" fs type which supports only zeroconf mounts. - old zeroconf client code removed from lustre-lite, and the lconf --zeroconf option deleted - common code factored out for ll/lustre fill_super and put_super - lconf still uses lustre_lite (but not for long) llmount will be used by mount for lustre filesystems if copied to /sbin/mount.lustre: mount -t lustre mds_host:/mds_servicee/profile /mnt/lustre Multiple mounts of the same filesystem are supported. Remove unused mds and filter nspath code. --- lnet/include/lnet/lnetctl.h | 1 + lnet/include/lnet/ptlctl.h | 1 + lustre/ldlm/ldlm_lib.c | 4 ++++ lustre/llite/llite_internal.h | 6 ++++-- lustre/portals/include/portals/ptlctl.h | 1 + lustre/tests/replay-single.sh | 16 ++++++++++++---- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/lnet/include/lnet/lnetctl.h b/lnet/include/lnet/lnetctl.h index 0466494..a9942aa 100644 --- a/lnet/include/lnet/lnetctl.h +++ b/lnet/include/lnet/lnetctl.h @@ -29,6 +29,7 @@ #define OBD_DEV_PATH "/dev/obd" int ptl_name2nal(char *str); +int ptl_parse_ipaddr (__u32 *ipaddrp, char *str); int ptl_parse_nid (ptl_nid_t *nidp, char *str); char * ptl_nid2str (char *buffer, ptl_nid_t nid); diff --git a/lnet/include/lnet/ptlctl.h b/lnet/include/lnet/ptlctl.h index 0466494..a9942aa 100644 --- a/lnet/include/lnet/ptlctl.h +++ b/lnet/include/lnet/ptlctl.h @@ -29,6 +29,7 @@ #define OBD_DEV_PATH "/dev/obd" int ptl_name2nal(char *str); +int ptl_parse_ipaddr (__u32 *ipaddrp, char *str); int ptl_parse_nid (ptl_nid_t *nidp, char *str); char * ptl_nid2str (char *buffer, ptl_nid_t nid); diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 355fb03..b1789af 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -396,6 +396,10 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler) obd_str2uuid (&tgtuuid, str); target = class_uuid2obd(&tgtuuid); + if (!target) { + target = class_name2obd(str); + } + if (!target || target->obd_stopping || !target->obd_set_up) { CERROR("UUID '%s' is not available for connect\n", str); GOTO(out, rc = -ENODEV); diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 8264576..3a2b1e6 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -148,13 +148,15 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry); /* llite/llite_lib.c */ extern struct super_operations ll_super_operations; +extern struct super_operations lustre_super_operations; char *ll_read_opt(const char *opt, char *data); int ll_set_opt(const char *opt, char *data, int fl); -void ll_options(char *options, char **ost, char **mds, char **zconf, - char **mds_uuid, char **mds_peer, int *flags); +void ll_options(char *options, char **ost, char **mds, int *flags); void ll_lli_init(struct ll_inode_info *lli); int ll_fill_super(struct super_block *sb, void *data, int silent); +int lustre_fill_super(struct super_block *sb, void *data, int silent); +void lustre_put_super(struct super_block *sb); void ll_put_super(struct super_block *sb); struct inode *ll_inode_from_lock(struct ldlm_lock *lock); void ll_clear_inode(struct inode *inode); diff --git a/lustre/portals/include/portals/ptlctl.h b/lustre/portals/include/portals/ptlctl.h index 0466494..a9942aa 100644 --- a/lustre/portals/include/portals/ptlctl.h +++ b/lustre/portals/include/portals/ptlctl.h @@ -29,6 +29,7 @@ #define OBD_DEV_PATH "/dev/obd" int ptl_name2nal(char *str); +int ptl_parse_ipaddr (__u32 *ipaddrp, char *str); int ptl_parse_nid (ptl_nid_t *nidp, char *str); char * ptl_nid2str (char *buffer, ptl_nid_t nid); diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index f06b951..7d97622 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -70,8 +70,10 @@ cleanup() { fail mds fi - $LCONF --cleanup --zeroconf --mds_uuid mds1_UUID --mds_nid $mds_HOST \ - --local_nid $client_HOST --profile client_facet --mount $MOUNT + umount $MOUNT || : + rmmod llite || : +# $LCONF --cleanup --zeroconf --mds_uuid mds1_UUID --mds_nid $mds_HOST \ +# --local_nid $client_HOST --profile client_facet --mount $MOUNT stop mds ${FORCE} $MDSLCONFARGS stop ost ${FORCE} --dump cleanup.log } @@ -90,8 +92,14 @@ start ost --reformat $OSTLCONFARGS start mds $MDSLCONFARGS --reformat # 0-conf client -$LCONF --zeroconf --mds_uuid mds1_UUID --mds_nid `h2$NETTYPE $mds_HOST` \ - --local_nid `h2$NETTYPE $client_HOST` --profile client_facet --mount $MOUNT +[ -d $MOUNT ] || mkdir /mnt/lustre +insmod ../llite/llite.o || : +../utils/lctl modules > /r/tmp/ogdb-`hostname` +cp ../utils/llmount /sbin/mount.lustre +mount -t lustre $mds_HOST:/mds1/client_facet $MOUNT + +#$LCONF --zeroconf --mds_uuid mds1_UUID --mds_nid `h2$NETTYPE $mds_HOST` \ +# --local_nid `h2$NETTYPE $client_HOST` --profile client_facet --mount $MOUNT echo $TIMEOUT > /proc/sys/lustre/timeout echo $UPCALL > /proc/sys/lustre/upcall -- 1.8.3.1