From a608f14c7ff5ac954ce3aa28b3f12c5a99d836f9 Mon Sep 17 00:00:00 2001 From: tappro Date: Wed, 26 Nov 2008 08:05:10 +0000 Subject: [PATCH] - check that fs is version-capable and avoid VBR if not b:17717 i:adilger,alex --- lustre/obdclass/target.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lustre/obdclass/target.c b/lustre/obdclass/target.c index e3b3df6..c723a99 100644 --- a/lustre/obdclass/target.c +++ b/lustre/obdclass/target.c @@ -175,3 +175,12 @@ void target_trans_table_update(struct obd_export *exp, __u64 transno) spin_unlock(&obt->obt_trans_table_lock); } EXPORT_SYMBOL(target_trans_table_update); + +int target_fs_version_capable(struct obd_device *obd) +{ + struct inode * inode = obd->u.obt.obt_rcvd_filp->f_dentry->d_inode; + /** check inode has version */ + return (fsfilt_get_version(obd, inode) != -EOPNOTSUPP); +} +EXPORT_SYMBOL(target_fs_version_capable); + -- 1.8.3.1