From 4ca80bc7cc05be6f44703db5a56dbe1c8a0a95ba Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 18 Oct 2006 16:14:19 +0000 Subject: [PATCH] - save fid in och instead of pointer to it which may become invalid in file close time; --- lustre/include/lustre_lib.h | 6 +++--- lustre/llite/file.c | 2 +- lustre/lmv/lmv_obd.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_lib.h b/lustre/include/lustre_lib.h index 5fb2ad3..2c2031e 100644 --- a/lustre/include/lustre_lib.h +++ b/lustre/include/lustre_lib.h @@ -88,9 +88,9 @@ struct client_obd *client_conn2cli(struct lustre_handle *conn); struct mdc_open_data; struct obd_client_handle { - struct lustre_handle och_fh; - struct lu_fid *och_fid; - struct llog_cookie och_cookie; + struct lustre_handle och_fh; + struct lu_fid och_fid; + struct llog_cookie och_cookie; struct mdc_open_data *och_mod; __u32 och_magic; int och_flags; diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 49cd749..4821b0e 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -377,7 +377,7 @@ static int ll_och_fill(struct obd_export *md_exp, struct ll_inode_info *lli, memcpy(&och->och_fh, &body->handle, sizeof(body->handle)); och->och_magic = OBD_CLIENT_HANDLE_MAGIC; - och->och_fid = &lli->lli_fid; + och->och_fid = lli->lli_fid; och->och_flags = it->it_flags; lli->lli_ioepoch = body->ioepoch; diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 89bef75..8679a63 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -2437,7 +2437,7 @@ int lmv_clear_open_replay_data(struct obd_export *exp, struct obd_export *tgt_exp; ENTRY; - tgt_exp = lmv_get_export(lmv, och->och_fid); + tgt_exp = lmv_get_export(lmv, &och->och_fid); if (IS_ERR(tgt_exp)) RETURN(PTR_ERR(tgt_exp)); -- 1.8.3.1