[lustre-devel] [PATCH 02/20] lustre: obdclass: set OBD_MD_FLGROUP for ladvise RPC
James Simmons <[email protected]>
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Li Dongyang <[email protected]> ladvise RPC doesn't have OBD_MD_FLGROUP set, when RPC reaches server, tgt_validate_obdo() will corrupt the FID if it's seq is in FID_SEQ_NORMAL range. Do not mess with seq in obdo_to_ioobj() and tgt_validate_obdo(), since 2.0 all RPCs should have OBD_MD_FLGROUP set. Add OBD_MD_FLGROUP for ladvise RPC to fix new client talking to old servers. WC-bug-id: https://jira.whamcloud.com/browse/LU-16057 Lustre-commit: bee803c6e440ba6b5 ("LU-16057 obdclass: set OBD_MD_FLGROUP for ladvise RPC") Signed-off-by: Li Dongyang <[email protected]> Reviewed-on: https://review.whamcloud.com/48080 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Arshad Hussain <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> --- fs/lustre/obdclass/obdo.c | 3 --- fs/lustre/osc/osc_io.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/lustre/obdclass/obdo.c b/fs/lustre/obdclass/obdo.c index 7df4ff399890..9cafda16a95f 100644 --- a/fs/lustre/obdclass/obdo.c +++ b/fs/lustre/obdclass/obdo.c @@ -123,9 +123,6 @@ EXPORT_SYMBOL(obdo_from_inode); void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj) { ioobj->ioo_oid = oa->o_oi; - if (unlikely(!(oa->o_valid & OBD_MD_FLGROUP))) - ostid_set_seq_mdt0(&ioobj->ioo_oid); - /* Since 2.4 this does not contain o_mode in the low 16 bits. * Instead, it holds (bd_md_max_brw - 1) for multi-bulk BRW RPCs */ diff --git a/fs/lustre/osc/osc_io.c b/fs/lustre/osc/osc_io.c index 655c7c68ab3a..4c9b3d2bb481 100644 --- a/fs/lustre/osc/osc_io.c +++ b/fs/lustre/osc/osc_io.c @@ -1036,7 +1036,7 @@ static int osc_io_ladvise_start(const struct lu_env *env, memset(oa, 0, sizeof(*oa)); oa->o_oi = loi->loi_oi; - oa->o_valid = OBD_MD_FLID; + oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP; obdo_set_parent_fid(oa, lio->li_fid); ladvise = ladvise_hdr->lah_advise; -- 2.27.0 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org