From f1cac25e30703d93487a113076f82ecf6056bc6c Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 8 May 2006 23:39:09 +0000 Subject: [PATCH] osd-oi: pass transaction handle to object index functions --- lustre/osd/osd_oi.c | 14 +++++++++----- lustre/osd/osd_oi.h | 7 +++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lustre/osd/osd_oi.c b/lustre/osd/osd_oi.c index 834ebae..781de2b 100644 --- a/lustre/osd/osd_oi.c +++ b/lustre/osd/osd_oi.c @@ -150,7 +150,8 @@ int osd_oi_lookup(struct osd_thread_info *info, struct osd_oi *oi, * Locking: requires write lock on oi. */ int osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi, - const struct lu_fid *fid, const struct osd_inode_id *id) + const struct lu_fid *fid, const struct osd_inode_id *id, + struct thandle *th) { struct oi_entry *entry; int result; @@ -175,7 +176,8 @@ int osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi, * Locking: requires write lock on oi. */ int osd_oi_delete(struct osd_thread_info *info, - struct osd_oi *oi, const struct lu_fid *fid) + struct osd_oi *oi, const struct lu_fid *fid, + struct thandle *th) { struct oi_entry *entry; int result; @@ -205,7 +207,7 @@ void osd_oi_init0(struct osd_oi *oi, __u64 root_ino, __u32 root_gen) .oii_gen = root_gen }; - result = osd_oi_insert(NULL, oi, &root_fid, &root_id); + result = osd_oi_insert(NULL, oi, &root_fid, &root_id, NULL); LASSERT(result == 0); } @@ -247,7 +249,8 @@ int osd_oi_lookup(struct osd_thread_info *info, struct osd_oi *oi, * Locking: requires write lock on oi. */ int osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi, - const struct lu_fid *fid, const struct osd_inode_id *id) + const struct lu_fid *fid, const struct osd_inode_id *id, + struct thandle *th) { LASSERT(id->oii_ino == fid_seq(fid)); LASSERT(id->oii_gen == fid_oid(fid)); @@ -258,7 +261,8 @@ int osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi, * Locking: requires write lock on oi. */ int osd_oi_delete(struct osd_thread_info *info, - struct osd_oi *oi, const struct lu_fid *fid) + struct osd_oi *oi, const struct lu_fid *fid, + struct thandle *th) { return 0; } diff --git a/lustre/osd/osd_oi.h b/lustre/osd/osd_oi.h index 089c5b3..0b92534 100644 --- a/lustre/osd/osd_oi.h +++ b/lustre/osd/osd_oi.h @@ -40,6 +40,7 @@ struct dentry; struct lu_fid; struct osd_thread_info; struct lu_site; +struct thandle; struct osd_oi { struct dentry *oi_dir; @@ -67,9 +68,11 @@ void osd_oi_write_unlock(struct osd_oi *oi); int osd_oi_lookup(struct osd_thread_info *info, struct osd_oi *oi, const struct lu_fid *fid, struct osd_inode_id *id); int osd_oi_insert(struct osd_thread_info *info, struct osd_oi *oi, - const struct lu_fid *fid, const struct osd_inode_id *id); + const struct lu_fid *fid, const struct osd_inode_id *id, + struct thandle *th); int osd_oi_delete(struct osd_thread_info *info, - struct osd_oi *oi, const struct lu_fid *fid); + struct osd_oi *oi, const struct lu_fid *fid, + struct thandle *th); #define OI_IN_MEMORY (1) -- 1.8.3.1