diff options
-rw-r--r-- | Documentation/filesystems/ext2.txt | 5 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | fs/inode.c | 47 | ||||
-rw-r--r-- | fs/namespace.c | 11 | ||||
-rw-r--r-- | include/linux/fs.h | 1 | ||||
-rw-r--r-- | include/linux/mount.h | 1 | ||||
-rw-r--r-- | mm/page-writeback.c | 4 |
7 files changed, 58 insertions, 18 deletions
diff --git a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt index 23448551cabe..e055acb6b2d4 100644 --- a/Documentation/filesystems/ext2.txt +++ b/Documentation/filesystems/ext2.txt | |||
@@ -376,7 +376,8 @@ Implementations for: | |||
376 | Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs | 376 | Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs |
377 | Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 | 377 | Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 |
378 | DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ | 378 | DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ |
379 | OS/2 (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ | 379 | OS/2 (+) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ |
380 | RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ | 380 | RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ |
381 | 381 | ||
382 | (*) no longer actively developed/supported (as of Mar 2009) | 382 | (*) no longer actively developed/supported (as of Apr 2001) |
383 | (+) no longer actively developed/supported (as of Mar 2009) | ||
@@ -1,8 +1,8 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 29 | 3 | SUBLEVEL = 29 |
4 | EXTRAVERSION = -rc8 | 4 | EXTRAVERSION = |
5 | NAME = Erotic Pickled Herring | 5 | NAME = Temporary Tasmanian Devil |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
@@ -569,6 +569,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) | |||
569 | # disable invalid "can't wrap" optimzations for signed / pointers | 569 | # disable invalid "can't wrap" optimzations for signed / pointers |
570 | KBUILD_CFLAGS += $(call cc-option,-fwrapv) | 570 | KBUILD_CFLAGS += $(call cc-option,-fwrapv) |
571 | 571 | ||
572 | # revert to pre-gcc-4.4 behaviour of .eh_frame | ||
573 | KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) | ||
574 | |||
572 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments | 575 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
573 | # But warn user when we do so | 576 | # But warn user when we do so |
574 | warn-assign = \ | 577 | warn-assign = \ |
diff --git a/fs/inode.c b/fs/inode.c index 826fb0b9d1c3..6ac0cef6c5f5 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -1290,6 +1290,40 @@ sector_t bmap(struct inode * inode, sector_t block) | |||
1290 | } | 1290 | } |
1291 | EXPORT_SYMBOL(bmap); | 1291 | EXPORT_SYMBOL(bmap); |
1292 | 1292 | ||
1293 | /* | ||
1294 | * With relative atime, only update atime if the previous atime is | ||
1295 | * earlier than either the ctime or mtime or if at least a day has | ||
1296 | * passed since the last atime update. | ||
1297 | */ | ||
1298 | static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, | ||
1299 | struct timespec now) | ||
1300 | { | ||
1301 | |||
1302 | if (!(mnt->mnt_flags & MNT_RELATIME)) | ||
1303 | return 1; | ||
1304 | /* | ||
1305 | * Is mtime younger than atime? If yes, update atime: | ||
1306 | */ | ||
1307 | if (timespec_compare(&inode->i_mtime, &inode->i_atime) >= 0) | ||
1308 | return 1; | ||
1309 | /* | ||
1310 | * Is ctime younger than atime? If yes, update atime: | ||
1311 | */ | ||
1312 | if (timespec_compare(&inode->i_ctime, &inode->i_atime) >= 0) | ||
1313 | return 1; | ||
1314 | |||
1315 | /* | ||
1316 | * Is the previous atime value older than a day? If yes, | ||
1317 | * update atime: | ||
1318 | */ | ||
1319 | if ((long)(now.tv_sec - inode->i_atime.tv_sec) >= 24*60*60) | ||
1320 | return 1; | ||
1321 | /* | ||
1322 | * Good, we can skip the atime update: | ||
1323 | */ | ||
1324 | return 0; | ||
1325 | } | ||
1326 | |||
1293 | /** | 1327 | /** |
1294 | * touch_atime - update the access time | 1328 | * touch_atime - update the access time |
1295 | * @mnt: mount the inode is accessed on | 1329 | * @mnt: mount the inode is accessed on |
@@ -1317,17 +1351,12 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) | |||
1317 | goto out; | 1351 | goto out; |
1318 | if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)) | 1352 | if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)) |
1319 | goto out; | 1353 | goto out; |
1320 | if (mnt->mnt_flags & MNT_RELATIME) { | ||
1321 | /* | ||
1322 | * With relative atime, only update atime if the previous | ||
1323 | * atime is earlier than either the ctime or mtime. | ||
1324 | */ | ||
1325 | if (timespec_compare(&inode->i_mtime, &inode->i_atime) < 0 && | ||
1326 | timespec_compare(&inode->i_ctime, &inode->i_atime) < 0) | ||
1327 | goto out; | ||
1328 | } | ||
1329 | 1354 | ||
1330 | now = current_fs_time(inode->i_sb); | 1355 | now = current_fs_time(inode->i_sb); |
1356 | |||
1357 | if (!relatime_need_update(mnt, inode, now)) | ||
1358 | goto out; | ||
1359 | |||
1331 | if (timespec_equal(&inode->i_atime, &now)) | 1360 | if (timespec_equal(&inode->i_atime, &now)) |
1332 | goto out; | 1361 | goto out; |
1333 | 1362 | ||
diff --git a/fs/namespace.c b/fs/namespace.c index 06f8e63f6cb1..f0e753097353 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -780,6 +780,7 @@ static void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt) | |||
780 | { MNT_NOATIME, ",noatime" }, | 780 | { MNT_NOATIME, ",noatime" }, |
781 | { MNT_NODIRATIME, ",nodiratime" }, | 781 | { MNT_NODIRATIME, ",nodiratime" }, |
782 | { MNT_RELATIME, ",relatime" }, | 782 | { MNT_RELATIME, ",relatime" }, |
783 | { MNT_STRICTATIME, ",strictatime" }, | ||
783 | { 0, NULL } | 784 | { 0, NULL } |
784 | }; | 785 | }; |
785 | const struct proc_fs_info *fs_infop; | 786 | const struct proc_fs_info *fs_infop; |
@@ -1919,6 +1920,9 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1919 | if (data_page) | 1920 | if (data_page) |
1920 | ((char *)data_page)[PAGE_SIZE - 1] = 0; | 1921 | ((char *)data_page)[PAGE_SIZE - 1] = 0; |
1921 | 1922 | ||
1923 | /* Default to relatime */ | ||
1924 | mnt_flags |= MNT_RELATIME; | ||
1925 | |||
1922 | /* Separate the per-mountpoint flags */ | 1926 | /* Separate the per-mountpoint flags */ |
1923 | if (flags & MS_NOSUID) | 1927 | if (flags & MS_NOSUID) |
1924 | mnt_flags |= MNT_NOSUID; | 1928 | mnt_flags |= MNT_NOSUID; |
@@ -1930,13 +1934,14 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, | |||
1930 | mnt_flags |= MNT_NOATIME; | 1934 | mnt_flags |= MNT_NOATIME; |
1931 | if (flags & MS_NODIRATIME) | 1935 | if (flags & MS_NODIRATIME) |
1932 | mnt_flags |= MNT_NODIRATIME; | 1936 | mnt_flags |= MNT_NODIRATIME; |
1933 | if (flags & MS_RELATIME) | 1937 | if (flags & MS_STRICTATIME) |
1934 | mnt_flags |= MNT_RELATIME; | 1938 | mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME); |
1935 | if (flags & MS_RDONLY) | 1939 | if (flags & MS_RDONLY) |
1936 | mnt_flags |= MNT_READONLY; | 1940 | mnt_flags |= MNT_READONLY; |
1937 | 1941 | ||
1938 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | | 1942 | flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | |
1939 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT); | 1943 | MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | |
1944 | MS_STRICTATIME); | ||
1940 | 1945 | ||
1941 | /* ... and get the mountpoint */ | 1946 | /* ... and get the mountpoint */ |
1942 | retval = kern_path(dir_name, LOOKUP_FOLLOW, &path); | 1947 | retval = kern_path(dir_name, LOOKUP_FOLLOW, &path); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 92734c0012e6..5bc81c4a98c1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -141,6 +141,7 @@ struct inodes_stat_t { | |||
141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | 141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ |
142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | 142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ |
143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ | 143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ |
144 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | ||
144 | #define MS_ACTIVE (1<<30) | 145 | #define MS_ACTIVE (1<<30) |
145 | #define MS_NOUSER (1<<31) | 146 | #define MS_NOUSER (1<<31) |
146 | 147 | ||
diff --git a/include/linux/mount.h b/include/linux/mount.h index cab2a85e2ee8..51f55f903aff 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -27,6 +27,7 @@ struct mnt_namespace; | |||
27 | #define MNT_NODIRATIME 0x10 | 27 | #define MNT_NODIRATIME 0x10 |
28 | #define MNT_RELATIME 0x20 | 28 | #define MNT_RELATIME 0x20 |
29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ | 29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ |
30 | #define MNT_STRICTATIME 0x80 | ||
30 | 31 | ||
31 | #define MNT_SHRINKABLE 0x100 | 32 | #define MNT_SHRINKABLE 0x100 |
32 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ | 33 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 74dc57c74349..40ca7cdb653e 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -66,7 +66,7 @@ static inline long sync_writeback_pages(void) | |||
66 | /* | 66 | /* |
67 | * Start background writeback (via pdflush) at this percentage | 67 | * Start background writeback (via pdflush) at this percentage |
68 | */ | 68 | */ |
69 | int dirty_background_ratio = 5; | 69 | int dirty_background_ratio = 10; |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * dirty_background_bytes starts at 0 (disabled) so that it is a function of | 72 | * dirty_background_bytes starts at 0 (disabled) so that it is a function of |
@@ -83,7 +83,7 @@ int vm_highmem_is_dirtyable; | |||
83 | /* | 83 | /* |
84 | * The generator of dirty data starts writeback at this percentage | 84 | * The generator of dirty data starts writeback at this percentage |
85 | */ | 85 | */ |
86 | int vm_dirty_ratio = 10; | 86 | int vm_dirty_ratio = 20; |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * vm_dirty_bytes starts at 0 (disabled) so that it is a function of | 89 | * vm_dirty_bytes starts at 0 (disabled) so that it is a function of |