From: tappro Date: Wed, 26 Nov 2008 08:05:10 +0000 (+0000) Subject: - check that fs is version-capable and avoid VBR if not X-Git-Tag: v1_7_150~1^7 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a608f14c7ff5ac954ce3aa28b3f12c5a99d836f9;p=fs%2Flustre-release.git - check that fs is version-capable and avoid VBR if not b:17717 i:adilger,alex --- 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); +