#ifdef HAVE_QUOTAIO_V1_H
# include <linux/quotaio_v1.h>
# include <linux/quotaio_v2.h>
+#elif defined(HAVE_FS_QUOTA_QUOTAIO_V1_H)
+# include <quota/quotaio_v1.h>
+# include <quota/quotaio_v2.h>
+# include <quota/quota_tree.h>
+# define V2_DQTREEOFF QT_TREEOFF
#else
# include <quotaio_v1.h>
# include <quotaio_v2.h>
ext3_ext_walk_space(tree, block, num, cb);
#endif
+#ifdef EXT_INSERT_EXTENT_WITH_5ARGS
+#define fsfilt_ext3_ext_insert_extent(handle, inode, path, newext, flag) \
+ ext3_ext_insert_extent(handle, inode, path, newext, flag)
+#else
+#define fsfilt_ext3_ext_insert_extent(handle, inode, path, newext, flag) \
+ ext3_ext_insert_extent(handle, inode, path, newext)
+#endif
+
#include <linux/lustre_version.h>
struct bpointers {
struct obd_quotactl *oqc)
{
int i, rc = 0, error = 0;
- struct quotactl_ops *qcop;
+ const struct quotactl_ops *qcop;
struct if_dqinfo *info;
struct if_dqblk *dqblk;
ENTRY;
qsize_t dqb_ihardlimit; /** inode hard limit */
qsize_t dqb_isoftlimit; /** inode soft limit */
qsize_t dqb_curinodes; /** current inodes */
- __u64 dqb_btime; /** block grace time */
- __u64 dqb_itime; /** inode grace time */
+ obd_time dqb_btime; /** block grace time */
+ obd_time dqb_itime; /** inode grace time */
__u32 dqb_valid; /** flag for above fields */
};
static int v3_write_dqheader(struct file *f, int type)
{
static const __u32 quota_magics[] = V2_INITQMAGICS;
- static const __u32 quota_versions[] = V2_INITQVERSIONS_R1;
+ static const __u32 quota_versions[] = LUSTRE_INITQVERSIONS_V2;
struct v2_disk_dqheader dqhead;
loff_t offset = 0;
GOTO(out, rc = -EINVAL);
}
- DQUOT_DROP(file->f_dentry->d_inode);
+ ll_vfs_dq_drop(file->f_dentry->d_inode);
rc = v3_write_dqheader(file, i);
if (rc) {
/* we don't really need to take the group lock here,
* but it may be useful if one day we support online
* quotacheck */
+#ifdef HAVE_EXT4_LDISKFS
+ ext4_lock_group(sb, group);
+#else
spin_lock(sb_bgl_lock(sbi, group));
+#endif
if (desc->bg_flags & cpu_to_le16(EXT3_BG_INODE_UNINIT)) {
/* no inode in use in this group, just skip it */
+#ifdef HAVE_EXT4_LDISKFS
+ ext3_unlock_group(sb, group);
+#else
spin_unlock(sb_bgl_lock(sbi, group));
+#endif
continue;
}
+
used_count -= ext3_itable_unused_count(sb, desc);
+#ifdef HAVE_EXT4_LDISKFS
+ ext3_unlock_group(sb, group);
+#else
spin_unlock(sb_bgl_lock(sbi, group));
+#endif
}
ino = group * sbi->s_inodes_per_group + 1;