Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
debian-packages
lustre-release
Commits
63790a8d
Commit
63790a8d
authored
20 years ago
by
Wang Di
Browse files
Options
Downloads
Patches
Plain Diff
add -ERESTART handler for mds_getattr_name
parent
4b8f4409
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lustre/lmv/lmv_obd.c
+9
-0
9 additions, 0 deletions
lustre/lmv/lmv_obd.c
lustre/mds/handler.c
+33
-1
33 additions, 1 deletion
lustre/mds/handler.c
with
42 additions
and
1 deletion
lustre/lmv/lmv_obd.c
+
9
−
0
View file @
63790a8d
...
@@ -624,6 +624,7 @@ int lmv_getattr_name(struct obd_export *exp, struct ll_fid *fid,
...
@@ -624,6 +624,7 @@ int lmv_getattr_name(struct obd_export *exp, struct ll_fid *fid,
struct
lmv_obj
*
obj
;
struct
lmv_obj
*
obj
;
ENTRY
;
ENTRY
;
lmv_connect
(
obd
);
lmv_connect
(
obd
);
repeat:
obj
=
lmv_grab_obj
(
obd
,
fid
,
0
);
obj
=
lmv_grab_obj
(
obd
,
fid
,
0
);
if
(
obj
)
{
if
(
obj
)
{
/* directory is splitted. look for right mds for this name */
/* directory is splitted. look for right mds for this name */
...
@@ -656,6 +657,14 @@ int lmv_getattr_name(struct obd_export *exp, struct ll_fid *fid,
...
@@ -656,6 +657,14 @@ int lmv_getattr_name(struct obd_export *exp, struct ll_fid *fid,
ptlrpc_req_finished
(
*
request
);
ptlrpc_req_finished
(
*
request
);
*
request
=
req
;
*
request
=
req
;
}
}
}
else
if
(
rc
==
-
ERESTART
)
{
/* directory got splitted. time to update local object
* and repeat the request with proper MDS */
rc
=
lmv_get_mea_and_update_object
(
exp
,
&
rfid
);
if
(
rc
==
0
)
{
ptlrpc_req_finished
(
*
request
);
goto
repeat
;
}
}
}
RETURN
(
rc
);
RETURN
(
rc
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lustre/mds/handler.c
+
33
−
1
View file @
63790a8d
...
@@ -793,6 +793,33 @@ static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode,
...
@@ -793,6 +793,33 @@ static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode,
return
(
rc
);
return
(
rc
);
}
}
int
mds_check_mds_num
(
struct
obd_device
*
obd
,
struct
inode
*
inode
,
char
*
name
,
int
namelen
)
{
struct
mea
*
mea
=
NULL
;
int
mea_size
,
rc
=
0
;
ENTRY
;
rc
=
mds_get_lmv_attr
(
obd
,
inode
,
&
mea
,
&
mea_size
);
if
(
rc
)
RETURN
(
rc
);
if
(
mea
!=
NULL
)
{
/* dir is already splitted, check is requested filename
* should live at this MDS or at another one */
int
i
;
i
=
mea_name2idx
(
mea
,
name
,
namelen
-
1
);
if
(
mea
->
mea_master
!=
i
)
{
CERROR
(
"inapropriate MDS(%d) for %s. should be %d
\n
"
,
mea
->
mea_master
,
name
,
i
);
rc
=
-
ERESTART
;
}
}
if
(
mea
)
OBD_FREE
(
mea
,
mea_size
);
RETURN
(
rc
);
}
static
int
mds_getattr_name
(
int
offset
,
struct
ptlrpc_request
*
req
,
static
int
mds_getattr_name
(
int
offset
,
struct
ptlrpc_request
*
req
,
struct
lustre_handle
*
child_lockh
,
int
child_part
)
struct
lustre_handle
*
child_lockh
,
int
child_part
)
{
{
...
@@ -926,7 +953,12 @@ fill_inode:
...
@@ -926,7 +953,12 @@ fill_inode:
intent_set_disposition
(
rep
,
DISP_LOOKUP_NEG
);
intent_set_disposition
(
rep
,
DISP_LOOKUP_NEG
);
/* in the intent case, the policy clears this error:
/* in the intent case, the policy clears this error:
the disposition is enough */
the disposition is enough */
GOTO
(
cleanup
,
rc
=
-
ENOENT
);
rc
=
-
ENOENT
;
if
(
dparent
)
{
rc
=
mds_check_mds_num
(
obd
,
dparent
->
d_inode
,
name
,
namesize
);
}
GOTO
(
cleanup
,
rc
);
}
else
{
}
else
{
intent_set_disposition
(
rep
,
DISP_LOOKUP_POS
);
intent_set_disposition
(
rep
,
DISP_LOOKUP_POS
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment