From 0637fde4e882d2ff8753d843225b9755300ab747 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 3 Oct 2003 17:41:34 +0000 Subject: [PATCH] Fix POSIX creat.13, fstat.1, open.18, stat.3 mtime/atime on new files. b=2020 --- lustre/mdc/mdc_lib.c | 3 +++ lustre/mds/mds_lib.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index d1cc17f..148b883 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -154,6 +154,9 @@ void mdc_setattr_pack(struct ptlrpc_request *req, else if ((iattr->ia_valid & ATTR_MODE) && in_group_p(iattr->ia_gid)) rec->sa_suppgid = data->ctxt.gid1; + else if ((iattr->ia_valid & (ATTR_MTIME|ATTR_CTIME)) && + data->ctxt.gid1 != -1) + rec->sa_suppgid = data->ctxt.gid1; } if (ealen == 0) diff --git a/lustre/mds/mds_lib.c b/lustre/mds/mds_lib.c index c5d4839..54dd14b 100644 --- a/lustre/mds/mds_lib.c +++ b/lustre/mds/mds_lib.c @@ -61,7 +61,8 @@ void mds_pack_inode2body(struct mds_body *b, struct inode *inode) { b->valid |= OBD_MD_FLID | OBD_MD_FLCTIME | OBD_MD_FLUID | OBD_MD_FLGID | OBD_MD_FLFLAGS | OBD_MD_FLTYPE | - OBD_MD_FLMODE | OBD_MD_FLNLINK | OBD_MD_FLGENER; + OBD_MD_FLMODE | OBD_MD_FLNLINK | OBD_MD_FLGENER | + OBD_MD_FLATIME | OBD_MD_FLMTIME; /* bug 2020 */ if (!S_ISREG(inode->i_mode)) b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLATIME | -- 1.8.3.1