aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-11 18:31:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-11 18:31:13 -0500
commit3126c136bc30225d7a43af741778aa50e95e467a (patch)
tree71e6f0de6e1f4cde200dd632da4d2f61180289bf /include
parentf4d544ee5720d336a8c64f9fd33efb888c302309 (diff)
parent8e0eb4011bd73d5f91b215b532f74eef478ef795 (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: (21 commits) ext3: PTR_ERR return of wrong pointer in setup_new_group_blocks() ext3: Fix data / filesystem corruption when write fails to copy data ext4: Support for 64-bit quota format ext3: Support for vfsv1 quota format quota: Implement quota format with 64-bit space and inode limits quota: Move definition of QFMT_OCFS2 to linux/quota.h ext2: fix comment in ext2_find_entry about return values ext3: Unify log messages in ext3 ext2: clear uptodate flag on super block I/O error ext2: Unify log messages in ext2 ext3: make "norecovery" an alias for "noload" ext3: Don't update the superblock in ext3_statfs() ext3: journal all modifications in ext3_xattr_set_handle ext2: Explicitly assign values to on-disk enum of filetypes quota: Fix WARN_ON in lookup_one_len const: struct quota_format_ops ubifs: remove manual O_SYNC handling afs: remove manual O_SYNC handling kill wait_on_page_writeback_range vfs: Implement proper O_SYNC semantics ...
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/fcntl.h25
-rw-r--r--include/linux/ext2_fs.h16
-rw-r--r--include/linux/ext3_fs.h2
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/quota.h6
5 files changed, 35 insertions, 16 deletions
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index 495dc8af4044..681ddf3e844c 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -3,8 +3,6 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
7 located on an ext2 file system */
8#define O_ACCMODE 00000003 6#define O_ACCMODE 00000003
9#define O_RDONLY 00000000 7#define O_RDONLY 00000000
10#define O_WRONLY 00000001 8#define O_WRONLY 00000001
@@ -27,8 +25,8 @@
27#ifndef O_NONBLOCK 25#ifndef O_NONBLOCK
28#define O_NONBLOCK 00004000 26#define O_NONBLOCK 00004000
29#endif 27#endif
30#ifndef O_SYNC 28#ifndef O_DSYNC
31#define O_SYNC 00010000 29#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
32#endif 30#endif
33#ifndef FASYNC 31#ifndef FASYNC
34#define FASYNC 00020000 /* fcntl, for BSD compatibility */ 32#define FASYNC 00020000 /* fcntl, for BSD compatibility */
@@ -51,6 +49,25 @@
51#ifndef O_CLOEXEC 49#ifndef O_CLOEXEC
52#define O_CLOEXEC 02000000 /* set close_on_exec */ 50#define O_CLOEXEC 02000000 /* set close_on_exec */
53#endif 51#endif
52
53/*
54 * Before Linux 2.6.32 only O_DSYNC semantics were implemented, but using
55 * the O_SYNC flag. We continue to use the existing numerical value
56 * for O_DSYNC semantics now, but using the correct symbolic name for it.
57 * This new value is used to request true Posix O_SYNC semantics. It is
58 * defined in this strange way to make sure applications compiled against
59 * new headers get at least O_DSYNC semantics on older kernels.
60 *
61 * This has the nice side-effect that we can simply test for O_DSYNC
62 * wherever we do not care if O_DSYNC or O_SYNC is used.
63 *
64 * Note: __O_SYNC must never be used directly.
65 */
66#ifndef O_SYNC
67#define __O_SYNC 04000000
68#define O_SYNC (__O_SYNC|O_DSYNC)
69#endif
70
54#ifndef O_NDELAY 71#ifndef O_NDELAY
55#define O_NDELAY O_NONBLOCK 72#define O_NDELAY O_NONBLOCK
56#endif 73#endif
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 121720d74e15..2dfa7076e8b6 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -565,14 +565,14 @@ struct ext2_dir_entry_2 {
565 * other bits are reserved for now. 565 * other bits are reserved for now.
566 */ 566 */
567enum { 567enum {
568 EXT2_FT_UNKNOWN, 568 EXT2_FT_UNKNOWN = 0,
569 EXT2_FT_REG_FILE, 569 EXT2_FT_REG_FILE = 1,
570 EXT2_FT_DIR, 570 EXT2_FT_DIR = 2,
571 EXT2_FT_CHRDEV, 571 EXT2_FT_CHRDEV = 3,
572 EXT2_FT_BLKDEV, 572 EXT2_FT_BLKDEV = 4,
573 EXT2_FT_FIFO, 573 EXT2_FT_FIFO = 5,
574 EXT2_FT_SOCK, 574 EXT2_FT_SOCK = 6,
575 EXT2_FT_SYMLINK, 575 EXT2_FT_SYMLINK = 7,
576 EXT2_FT_MAX 576 EXT2_FT_MAX
577}; 577};
578 578
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 7499b3667798..6b049030fbe6 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -918,6 +918,8 @@ extern void ext3_abort (struct super_block *, const char *, const char *, ...)
918 __attribute__ ((format (printf, 3, 4))); 918 __attribute__ ((format (printf, 3, 4)));
919extern void ext3_warning (struct super_block *, const char *, const char *, ...) 919extern void ext3_warning (struct super_block *, const char *, const char *, ...)
920 __attribute__ ((format (printf, 3, 4))); 920 __attribute__ ((format (printf, 3, 4)));
921extern void ext3_msg(struct super_block *, const char *, const char *, ...)
922 __attribute__ ((format (printf, 3, 4)));
921extern void ext3_update_dynamic_rev (struct super_block *sb); 923extern void ext3_update_dynamic_rev (struct super_block *sb);
922 924
923#define ext3_std_error(sb, errno) \ 925#define ext3_std_error(sb, errno) \
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 891f7d642e5c..a057f48eb156 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2091,8 +2091,6 @@ extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
2091extern int filemap_write_and_wait(struct address_space *mapping); 2091extern int filemap_write_and_wait(struct address_space *mapping);
2092extern int filemap_write_and_wait_range(struct address_space *mapping, 2092extern int filemap_write_and_wait_range(struct address_space *mapping,
2093 loff_t lstart, loff_t lend); 2093 loff_t lstart, loff_t lend);
2094extern int wait_on_page_writeback_range(struct address_space *mapping,
2095 pgoff_t start, pgoff_t end);
2096extern int __filemap_fdatawrite_range(struct address_space *mapping, 2094extern int __filemap_fdatawrite_range(struct address_space *mapping,
2097 loff_t start, loff_t end, int sync_mode); 2095 loff_t start, loff_t end, int sync_mode);
2098extern int filemap_fdatawrite_range(struct address_space *mapping, 2096extern int filemap_fdatawrite_range(struct address_space *mapping,
diff --git a/include/linux/quota.h b/include/linux/quota.h
index ce9a9b2e5cd4..e70e62194243 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -73,6 +73,8 @@
73/* Quota format type IDs */ 73/* Quota format type IDs */
74#define QFMT_VFS_OLD 1 74#define QFMT_VFS_OLD 1
75#define QFMT_VFS_V0 2 75#define QFMT_VFS_V0 2
76#define QFMT_OCFS2 3
77#define QFMT_VFS_V1 4
76 78
77/* Size of block in which space limits are passed through the quota 79/* Size of block in which space limits are passed through the quota
78 * interface */ 80 * interface */
@@ -334,7 +336,7 @@ struct quotactl_ops {
334 336
335struct quota_format_type { 337struct quota_format_type {
336 int qf_fmt_id; /* Quota format id */ 338 int qf_fmt_id; /* Quota format id */
337 struct quota_format_ops *qf_ops; /* Operations of format */ 339 const struct quota_format_ops *qf_ops; /* Operations of format */
338 struct module *qf_owner; /* Module implementing quota format */ 340 struct module *qf_owner; /* Module implementing quota format */
339 struct quota_format_type *qf_next; 341 struct quota_format_type *qf_next;
340}; 342};
@@ -394,7 +396,7 @@ struct quota_info {
394 struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ 396 struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */
395 struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ 397 struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */
396 struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ 398 struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */
397 struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ 399 const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
398}; 400};
399 401
400int register_quota_format(struct quota_format_type *fmt); 402int register_quota_format(struct quota_format_type *fmt);