From 589774f4547e03c1316b6d862f307ddeaeab4307 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 19 Oct 2009 10:38:42 +0000 Subject: [PATCH] - fix credits for setattr (ldiskfs_dirty_inode() can modify superblock) --- lustre/osd/osd_handler.c | 4 ++-- lustre/osd/osd_io.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 02002ab..d076236 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -979,7 +979,7 @@ const int osd_dto_credits_noquota[DTO_NR] = { * Attr set credits. * 3(inode bits, group, GDT) */ - [DTO_ATTR_SET_BASE] = 1, + [DTO_ATTR_SET_BASE] = 2, /** * Xattr set. The same as xattr of EXT3. * DATA_TRANS_BLOCKS(14) @@ -1841,7 +1841,7 @@ static int osd_declare_object_create(const struct lu_env *env, OSD_DECLARE_OP(oh, create); oh->ot_credits += osd_dto_credits_noquota[DTO_OBJECT_CREATE]; oh->ot_credits += osd_dto_credits_noquota[DTO_INDEX_INSERT]; - + /* if this is directory, then we expect . and .. to be inserted as well */ OSD_DECLARE_OP(oh, insert); OSD_DECLARE_OP(oh, insert); diff --git a/lustre/osd/osd_io.c b/lustre/osd/osd_io.c index 64116bc..72bd28d 100644 --- a/lustre/osd/osd_io.c +++ b/lustre/osd/osd_io.c @@ -670,7 +670,9 @@ static ssize_t osd_write(const struct lu_env *env, struct dt_object *dt, return -EACCES; LASSERT(handle != NULL); - OSD_EXEC_OP(handle, write); + + /* XXX: don't check: one declared chunk can be used many times */ + /* OSD_EXEC_OP(handle, write); */ oh = container_of(handle, struct osd_thandle, ot_super); LASSERT(oh->ot_handle->h_transaction != NULL); -- 1.8.3.1