diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 18:52:38 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 18:52:38 -0500 |
| commit | c5452a58db9bbcb331ee92afa99a6f42e39085c7 (patch) | |
| tree | 90d3749e9103b0582079b40f64743959767df268 /include/linux | |
| parent | 4b4f8580a4b77126733db8072862793d4deae66a (diff) | |
| parent | 6981498d7956e3177b6f74926aa4a5c2a45b4edb (diff) | |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota interface unification and misc cleanups from Jan Kara:
"The first part of the series unifying XFS and VFS quota interfaces.
This part unifies turning quotas on and off so quota-tools and
xfs_quota can be used to manage any filesystem. This is useful so
that userspace doesn't have to distinguish which filesystem it is
working with. As a result we can then easily reuse tests for project
quotas in XFS for ext4.
This also contains minor cleanups and fixes for udf, isofs, and ext3"
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (23 commits)
udf: remove bool assignment to 0/1
udf: use bool for done
quota: Store maximum space limit in bytes
quota: Remove quota_on_meta callback
ocfs2: Use generic helpers for quotaon and quotaoff
ext4: Use generic helpers for quotaon and quotaoff
quota: Add ->quota_{enable,disable} callbacks for VFS quotas
quota: Wire up ->quota_{enable,disable} callbacks into Q_QUOTA{ON,OFF}
quota: Split ->set_xstate callback into two
xfs: Remove some pointless quota checks
xfs: Remove some useless flags tests
xfs: Remove useless test
quota: Verify flags passed to Q_SETINFO
quota: Cleanup flags definitions
ocfs2: Move OLQF_CLEAN flag out of generic quota flags
quota: Don't store flags for v2 quota format
jbd: drop jbd_ENOSYS debug
udf: destroy sbi mutex in put_super
udf: Check length of extended attributes and allocation descriptors
udf: Remove repeated loads blocksize
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dqblk_v1.h | 3 | ||||
| -rw-r--r-- | include/linux/jbd.h | 9 | ||||
| -rw-r--r-- | include/linux/jbd2.h | 9 | ||||
| -rw-r--r-- | include/linux/quota.h | 22 | ||||
| -rw-r--r-- | include/linux/quotaops.h | 3 |
5 files changed, 15 insertions, 31 deletions
diff --git a/include/linux/dqblk_v1.h b/include/linux/dqblk_v1.h index 3713a7232dd8..c0d4d1e2a45c 100644 --- a/include/linux/dqblk_v1.h +++ b/include/linux/dqblk_v1.h | |||
| @@ -5,9 +5,6 @@ | |||
| 5 | #ifndef _LINUX_DQBLK_V1_H | 5 | #ifndef _LINUX_DQBLK_V1_H |
| 6 | #define _LINUX_DQBLK_V1_H | 6 | #define _LINUX_DQBLK_V1_H |
| 7 | 7 | ||
| 8 | /* Root squash turned on */ | ||
| 9 | #define V1_DQF_RSQUASH 1 | ||
| 10 | |||
| 11 | /* Numbers of blocks needed for updates */ | 8 | /* Numbers of blocks needed for updates */ |
| 12 | #define V1_INIT_ALLOC 1 | 9 | #define V1_INIT_ALLOC 1 |
| 13 | #define V1_INIT_REWRITE 1 | 10 | #define V1_INIT_REWRITE 1 |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 31229e0be90b..d32615280be9 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
| @@ -956,15 +956,6 @@ void __log_wait_for_space(journal_t *journal); | |||
| 956 | extern void __journal_drop_transaction(journal_t *, transaction_t *); | 956 | extern void __journal_drop_transaction(journal_t *, transaction_t *); |
| 957 | extern int cleanup_journal_tail(journal_t *); | 957 | extern int cleanup_journal_tail(journal_t *); |
| 958 | 958 | ||
| 959 | /* Debugging code only: */ | ||
| 960 | |||
| 961 | #define jbd_ENOSYS() \ | ||
| 962 | do { \ | ||
| 963 | printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \ | ||
| 964 | current->state = TASK_UNINTERRUPTIBLE; \ | ||
| 965 | schedule(); \ | ||
| 966 | } while (1) | ||
| 967 | |||
| 968 | /* | 959 | /* |
| 969 | * is_journal_abort | 960 | * is_journal_abort |
| 970 | * | 961 | * |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 704b9a599b26..20e7f78041c8 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -1251,15 +1251,6 @@ void __jbd2_log_wait_for_space(journal_t *journal); | |||
| 1251 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); | 1251 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); |
| 1252 | extern int jbd2_cleanup_journal_tail(journal_t *); | 1252 | extern int jbd2_cleanup_journal_tail(journal_t *); |
| 1253 | 1253 | ||
| 1254 | /* Debugging code only: */ | ||
| 1255 | |||
| 1256 | #define jbd_ENOSYS() \ | ||
| 1257 | do { \ | ||
| 1258 | printk (KERN_ERR "JBD unimplemented function %s\n", __func__); \ | ||
| 1259 | current->state = TASK_UNINTERRUPTIBLE; \ | ||
| 1260 | schedule(); \ | ||
| 1261 | } while (1) | ||
| 1262 | |||
| 1263 | /* | 1254 | /* |
| 1264 | * is_journal_abort | 1255 | * is_journal_abort |
| 1265 | * | 1256 | * |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 097d7eb2441e..d534e8ed308a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -216,19 +216,21 @@ struct mem_dqinfo { | |||
| 216 | unsigned long dqi_flags; | 216 | unsigned long dqi_flags; |
| 217 | unsigned int dqi_bgrace; | 217 | unsigned int dqi_bgrace; |
| 218 | unsigned int dqi_igrace; | 218 | unsigned int dqi_igrace; |
| 219 | qsize_t dqi_maxblimit; | 219 | qsize_t dqi_max_spc_limit; |
| 220 | qsize_t dqi_maxilimit; | 220 | qsize_t dqi_max_ino_limit; |
| 221 | void *dqi_priv; | 221 | void *dqi_priv; |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | struct super_block; | 224 | struct super_block; |
| 225 | 225 | ||
| 226 | #define DQF_MASK 0xffff /* Mask for format specific flags */ | 226 | /* Mask for flags passed to userspace */ |
| 227 | #define DQF_GETINFO_MASK 0x1ffff /* Mask for flags passed to userspace */ | 227 | #define DQF_GETINFO_MASK (DQF_ROOT_SQUASH | DQF_SYS_FILE) |
| 228 | #define DQF_SETINFO_MASK 0xffff /* Mask for flags modifiable from userspace */ | 228 | /* Mask for flags modifiable from userspace */ |
| 229 | #define DQF_SYS_FILE_B 16 | 229 | #define DQF_SETINFO_MASK DQF_ROOT_SQUASH |
| 230 | #define DQF_SYS_FILE (1 << DQF_SYS_FILE_B) /* Quota file stored as system file */ | 230 | |
| 231 | #define DQF_INFO_DIRTY_B 31 | 231 | enum { |
| 232 | DQF_INFO_DIRTY_B = DQF_PRIVATE, | ||
| 233 | }; | ||
| 232 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ | 234 | #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */ |
| 233 | 235 | ||
| 234 | extern void mark_info_dirty(struct super_block *sb, int type); | 236 | extern void mark_info_dirty(struct super_block *sb, int type); |
| @@ -367,15 +369,15 @@ struct qc_dqblk { | |||
| 367 | /* Operations handling requests from userspace */ | 369 | /* Operations handling requests from userspace */ |
| 368 | struct quotactl_ops { | 370 | struct quotactl_ops { |
| 369 | int (*quota_on)(struct super_block *, int, int, struct path *); | 371 | int (*quota_on)(struct super_block *, int, int, struct path *); |
| 370 | int (*quota_on_meta)(struct super_block *, int, int); | ||
| 371 | int (*quota_off)(struct super_block *, int); | 372 | int (*quota_off)(struct super_block *, int); |
| 373 | int (*quota_enable)(struct super_block *, unsigned int); | ||
| 374 | int (*quota_disable)(struct super_block *, unsigned int); | ||
| 372 | int (*quota_sync)(struct super_block *, int); | 375 | int (*quota_sync)(struct super_block *, int); |
| 373 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 376 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
| 374 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); | 377 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); |
| 375 | int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); | 378 | int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
| 376 | int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); | 379 | int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
| 377 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); | 380 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); |
| 378 | int (*set_xstate)(struct super_block *, unsigned int, int); | ||
| 379 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); | 381 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); |
| 380 | int (*rm_xquota)(struct super_block *, unsigned int); | 382 | int (*rm_xquota)(struct super_block *, unsigned int); |
| 381 | }; | 383 | }; |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 29e3455f7d41..df73258cca47 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -166,6 +166,7 @@ static inline bool sb_has_quota_active(struct super_block *sb, int type) | |||
| 166 | */ | 166 | */ |
| 167 | extern const struct dquot_operations dquot_operations; | 167 | extern const struct dquot_operations dquot_operations; |
| 168 | extern const struct quotactl_ops dquot_quotactl_ops; | 168 | extern const struct quotactl_ops dquot_quotactl_ops; |
| 169 | extern const struct quotactl_ops dquot_quotactl_sysfile_ops; | ||
| 169 | 170 | ||
| 170 | #else | 171 | #else |
| 171 | 172 | ||
| @@ -386,4 +387,6 @@ static inline void dquot_release_reservation_block(struct inode *inode, | |||
| 386 | __dquot_free_space(inode, nr << inode->i_blkbits, DQUOT_SPACE_RESERVE); | 387 | __dquot_free_space(inode, nr << inode->i_blkbits, DQUOT_SPACE_RESERVE); |
| 387 | } | 388 | } |
| 388 | 389 | ||
| 390 | unsigned int qtype_enforce_flag(int type); | ||
| 391 | |||
| 389 | #endif /* _LINUX_QUOTAOPS_ */ | 392 | #endif /* _LINUX_QUOTAOPS_ */ |
