From 498b6a39cc9ee9a01b327572f966a066623a3169 Mon Sep 17 00:00:00 2001 From: Vladimir Saveliev Date: Fri, 5 Nov 2010 18:22:14 +0300 Subject: [PATCH] b=19669 update LOV object version only on data change LOV object version is changed only when LOV object content is changed, either on write or size change (truncate). No more on metadata change like chmod/chown/chgrp. Needed for HSM. a=aurelien.degremont i=mikhail.pershin --- lustre/obdfilter/filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index bff5eba..c6b330f 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -3276,7 +3276,10 @@ int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry, * we have two left for the last_rcvd and VBR inode version updates. */ err = fsfilt_extend(exp->exp_obd, inode, 2, handle); - rc = filter_finish_transno(exp, inode, oti, rc, sync); + /* Update inode version only if data has changed => size has changed */ + rc = filter_finish_transno(exp, ia_valid & ATTR_SIZE ? inode : NULL, + oti, rc, sync); + if (sync) { filter_cancel_cookies_cb(exp->exp_obd, 0, fcc, rc); fcc = NULL; -- 1.8.3.1