diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 15:57:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 15:57:07 -0400 |
commit | 90e0c225968f0878e090c7ff3f88323973476cee (patch) | |
tree | 30fff5a5cb18b08d40e4d496489be6ce714a6cde /include | |
parent | 938a73b959cf77aadc41bded3bf416b618aa20b3 (diff) | |
parent | 5f11e6a44059f728dddd8d0dbe5b4368ea93575b (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
ext3: Fix dirtying of journalled buffers in data=journal mode
ext3: default to ordered mode
quota: Use mark_inode_dirty_sync instead of mark_inode_dirty
quota: Change quota error message to print out disk and function name
MAINTAINERS: Update entries of ext2 and ext3
MAINTAINERS: Update address of Andreas Dilger
ext3: Avoid filesystem corruption after a crash under heavy delete load
ext3: remove vestiges of nobh support
ext3: Fix set but unused variables
quota: clean up quota active checks
quota: Clean up the namespace in dqblk_xfs.h
quota: check quota reservation on remove_dquot_ref
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dqblk_xfs.h | 24 | ||||
-rw-r--r-- | include/linux/ext3_fs.h | 1 | ||||
-rw-r--r-- | include/linux/quotaops.h | 26 |
3 files changed, 23 insertions, 28 deletions
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h index 4389ae72024e..86552807aed9 100644 --- a/include/linux/dqblk_xfs.h +++ b/include/linux/dqblk_xfs.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */ | 49 | #define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */ |
50 | typedef struct fs_disk_quota { | 50 | typedef struct fs_disk_quota { |
51 | __s8 d_version; /* version of this structure */ | 51 | __s8 d_version; /* version of this structure */ |
52 | __s8 d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */ | 52 | __s8 d_flags; /* FS_{USER,PROJ,GROUP}_QUOTA */ |
53 | __u16 d_fieldmask; /* field specifier */ | 53 | __u16 d_fieldmask; /* field specifier */ |
54 | __u32 d_id; /* user, project, or group ID */ | 54 | __u32 d_id; /* user, project, or group ID */ |
55 | __u64 d_blk_hardlimit;/* absolute limit on disk blks */ | 55 | __u64 d_blk_hardlimit;/* absolute limit on disk blks */ |
@@ -119,18 +119,18 @@ typedef struct fs_disk_quota { | |||
119 | #define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT) | 119 | #define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT) |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * Various flags related to quotactl(2). Only relevant to XFS filesystems. | 122 | * Various flags related to quotactl(2). |
123 | */ | 123 | */ |
124 | #define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ | 124 | #define FS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ |
125 | #define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ | 125 | #define FS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ |
126 | #define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ | 126 | #define FS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ |
127 | #define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ | 127 | #define FS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ |
128 | #define XFS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */ | 128 | #define FS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */ |
129 | #define XFS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */ | 129 | #define FS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */ |
130 | 130 | ||
131 | #define XFS_USER_QUOTA (1<<0) /* user quota type */ | 131 | #define FS_USER_QUOTA (1<<0) /* user quota type */ |
132 | #define XFS_PROJ_QUOTA (1<<1) /* project quota type */ | 132 | #define FS_PROJ_QUOTA (1<<1) /* project quota type */ |
133 | #define XFS_GROUP_QUOTA (1<<2) /* group quota type */ | 133 | #define FS_GROUP_QUOTA (1<<2) /* group quota type */ |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. | 136 | * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. |
@@ -151,7 +151,7 @@ typedef struct fs_qfilestat { | |||
151 | 151 | ||
152 | typedef struct fs_quota_stat { | 152 | typedef struct fs_quota_stat { |
153 | __s8 qs_version; /* version number for future changes */ | 153 | __s8 qs_version; /* version number for future changes */ |
154 | __u16 qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ | 154 | __u16 qs_flags; /* FS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ |
155 | __s8 qs_pad; /* unused */ | 155 | __s8 qs_pad; /* unused */ |
156 | fs_qfilestat_t qs_uquota; /* user quota storage information */ | 156 | fs_qfilestat_t qs_uquota; /* user quota storage information */ |
157 | fs_qfilestat_t qs_gquota; /* group quota storage information */ | 157 | fs_qfilestat_t qs_gquota; /* group quota storage information */ |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 7fc62d4550b2..3d3a9915dde2 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -400,7 +400,6 @@ struct ext3_inode { | |||
400 | #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ | 400 | #define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */ |
401 | #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ | 401 | #define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */ |
402 | #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ | 402 | #define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */ |
403 | #define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */ | ||
404 | #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ | 403 | #define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */ |
405 | #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ | 404 | #define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */ |
406 | #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ | 405 | #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index aa36793b48bd..d50ba858cfe0 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -28,6 +28,12 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia) | |||
28 | 28 | ||
29 | #if defined(CONFIG_QUOTA) | 29 | #if defined(CONFIG_QUOTA) |
30 | 30 | ||
31 | #define quota_error(sb, fmt, args...) \ | ||
32 | __quota_error((sb), __func__, fmt , ## args) | ||
33 | |||
34 | extern void __quota_error(struct super_block *sb, const char *func, | ||
35 | const char *fmt, ...); | ||
36 | |||
31 | /* | 37 | /* |
32 | * declaration of quota_function calls in kernel. | 38 | * declaration of quota_function calls in kernel. |
33 | */ | 39 | */ |
@@ -145,11 +151,6 @@ static inline bool sb_has_quota_active(struct super_block *sb, int type) | |||
145 | !sb_has_quota_suspended(sb, type); | 151 | !sb_has_quota_suspended(sb, type); |
146 | } | 152 | } |
147 | 153 | ||
148 | static inline unsigned sb_any_quota_active(struct super_block *sb) | ||
149 | { | ||
150 | return sb_any_quota_loaded(sb) & ~sb_any_quota_suspended(sb); | ||
151 | } | ||
152 | |||
153 | /* | 154 | /* |
154 | * Operations supported for diskquotas. | 155 | * Operations supported for diskquotas. |
155 | */ | 156 | */ |
@@ -194,11 +195,6 @@ static inline int sb_has_quota_active(struct super_block *sb, int type) | |||
194 | return 0; | 195 | return 0; |
195 | } | 196 | } |
196 | 197 | ||
197 | static inline int sb_any_quota_active(struct super_block *sb) | ||
198 | { | ||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static inline void dquot_initialize(struct inode *inode) | 198 | static inline void dquot_initialize(struct inode *inode) |
203 | { | 199 | { |
204 | } | 200 | } |
@@ -270,7 +266,7 @@ static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) | |||
270 | static inline void dquot_alloc_space_nofail(struct inode *inode, qsize_t nr) | 266 | static inline void dquot_alloc_space_nofail(struct inode *inode, qsize_t nr) |
271 | { | 267 | { |
272 | __dquot_alloc_space(inode, nr, DQUOT_SPACE_WARN|DQUOT_SPACE_NOFAIL); | 268 | __dquot_alloc_space(inode, nr, DQUOT_SPACE_WARN|DQUOT_SPACE_NOFAIL); |
273 | mark_inode_dirty(inode); | 269 | mark_inode_dirty_sync(inode); |
274 | } | 270 | } |
275 | 271 | ||
276 | static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) | 272 | static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) |
@@ -279,7 +275,7 @@ static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) | |||
279 | 275 | ||
280 | ret = dquot_alloc_space_nodirty(inode, nr); | 276 | ret = dquot_alloc_space_nodirty(inode, nr); |
281 | if (!ret) | 277 | if (!ret) |
282 | mark_inode_dirty(inode); | 278 | mark_inode_dirty_sync(inode); |
283 | return ret; | 279 | return ret; |
284 | } | 280 | } |
285 | 281 | ||
@@ -309,7 +305,7 @@ static inline int dquot_prealloc_block(struct inode *inode, qsize_t nr) | |||
309 | 305 | ||
310 | ret = dquot_prealloc_block_nodirty(inode, nr); | 306 | ret = dquot_prealloc_block_nodirty(inode, nr); |
311 | if (!ret) | 307 | if (!ret) |
312 | mark_inode_dirty(inode); | 308 | mark_inode_dirty_sync(inode); |
313 | return ret; | 309 | return ret; |
314 | } | 310 | } |
315 | 311 | ||
@@ -325,7 +321,7 @@ static inline int dquot_claim_block(struct inode *inode, qsize_t nr) | |||
325 | 321 | ||
326 | ret = dquot_claim_space_nodirty(inode, nr << inode->i_blkbits); | 322 | ret = dquot_claim_space_nodirty(inode, nr << inode->i_blkbits); |
327 | if (!ret) | 323 | if (!ret) |
328 | mark_inode_dirty(inode); | 324 | mark_inode_dirty_sync(inode); |
329 | return ret; | 325 | return ret; |
330 | } | 326 | } |
331 | 327 | ||
@@ -337,7 +333,7 @@ static inline void dquot_free_space_nodirty(struct inode *inode, qsize_t nr) | |||
337 | static inline void dquot_free_space(struct inode *inode, qsize_t nr) | 333 | static inline void dquot_free_space(struct inode *inode, qsize_t nr) |
338 | { | 334 | { |
339 | dquot_free_space_nodirty(inode, nr); | 335 | dquot_free_space_nodirty(inode, nr); |
340 | mark_inode_dirty(inode); | 336 | mark_inode_dirty_sync(inode); |
341 | } | 337 | } |
342 | 338 | ||
343 | static inline void dquot_free_block_nodirty(struct inode *inode, qsize_t nr) | 339 | static inline void dquot_free_block_nodirty(struct inode *inode, qsize_t nr) |