From 4ccdb970c75ceffc84758504d8dd6f8c0c84039f Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 3 Nov 2003 23:41:31 +0000 Subject: [PATCH] Don't do setattr after transaction handle has been committed. Combine size and timestamp setattrs, and update size under i_sem. Use client timestamps instead of server timestamps for files. --- lustre/obdfilter/filter_internal.h | 5 ++--- lustre/obdfilter/filter_io.c | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index a7fac7b..32fa3fb 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -128,10 +128,9 @@ int filter_brw(int cmd, struct obd_export *, struct obdo *, void flip_into_page_cache(struct inode *inode, struct page *new_page); /* filter_io_*.c */ -int filter_commitrw_write(struct obd_export *exp, int objcount, +int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount, struct obd_ioobj *obj, int niocount, - struct niobuf_local *res, - struct obd_trans_info *oti); + struct niobuf_local *res, struct obd_trans_info *oti); /* filter_log.c */ struct ost_filterdata { diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index 4ee3356..2b3dd1d 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -350,9 +350,9 @@ int filter_preprw(int cmd, struct obd_export *exp, struct obdo *oa, return -EPROTO; } -static int filter_commitrw_read(struct obd_export *exp, int objcount, - struct obd_ioobj *obj, int niocount, - struct niobuf_local *res, +static int filter_commitrw_read(struct obd_export *exp, struct obdo *oa, + int objcount, struct obd_ioobj *obj, + int niocount, struct niobuf_local *res, struct obd_trans_info *oti) { struct obd_ioobj *o; @@ -420,10 +420,10 @@ int filter_commitrw(int cmd, struct obd_export *exp, struct obdo *oa, struct niobuf_local *res, struct obd_trans_info *oti) { if (cmd == OBD_BRW_WRITE) - return filter_commitrw_write(exp, objcount, obj, niocount, + return filter_commitrw_write(exp, oa, objcount, obj, niocount, res, oti); if (cmd == OBD_BRW_READ) - return filter_commitrw_read(exp, objcount, obj, niocount, + return filter_commitrw_read(exp, oa, objcount, obj, niocount, res, oti); LBUG(); return -EPROTO; -- 1.8.3.1