diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-03-03 14:18:08 -0500 |
---|---|---|
committer | Christoph Lameter <clameter@sgi.com> | 2008-03-03 14:18:08 -0500 |
commit | 27710bf6febe8323f78bceca002ca7d71e5012a7 (patch) | |
tree | 80a72f385ea28f9f7649363fe5147b3da37f9950 /fs | |
parent | 9ef64cb4320df821638b508f79aa8b858cca99f0 (diff) | |
parent | cad226b8a71f969ad05137e43b48c9e6059a0b9f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 3 | ||||
-rw-r--r-- | fs/exec.c | 10 | ||||
-rw-r--r-- | fs/jbd/transaction.c | 17 | ||||
-rw-r--r-- | fs/mpage.c | 11 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 14 | ||||
-rw-r--r-- | fs/xfs/xfs_clnt.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 4 |
9 files changed, 34 insertions, 31 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 3ebccf4aa7e3..897cd7477b34 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -627,8 +627,7 @@ repeat: | |||
627 | } | 627 | } |
628 | 628 | ||
629 | /** | 629 | /** |
630 | * sync_mapping_buffers - write out and wait upon a mapping's "associated" | 630 | * sync_mapping_buffers - write out & wait upon a mapping's "associated" buffers |
631 | * buffers | ||
632 | * @mapping: the mapping which wants those buffers written | 631 | * @mapping: the mapping which wants those buffers written |
633 | * | 632 | * |
634 | * Starts I/O against the buffers at mapping->private_list, and waits upon | 633 | * Starts I/O against the buffers at mapping->private_list, and waits upon |
@@ -173,8 +173,15 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | |||
173 | return NULL; | 173 | return NULL; |
174 | 174 | ||
175 | if (write) { | 175 | if (write) { |
176 | struct rlimit *rlim = current->signal->rlim; | ||
177 | unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; | 176 | unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; |
177 | struct rlimit *rlim; | ||
178 | |||
179 | /* | ||
180 | * We've historically supported up to 32 pages (ARG_MAX) | ||
181 | * of argument strings even with small stacks | ||
182 | */ | ||
183 | if (size <= ARG_MAX) | ||
184 | return page; | ||
178 | 185 | ||
179 | /* | 186 | /* |
180 | * Limit to 1/4-th the stack size for the argv+env strings. | 187 | * Limit to 1/4-th the stack size for the argv+env strings. |
@@ -183,6 +190,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | |||
183 | * - the program will have a reasonable amount of stack left | 190 | * - the program will have a reasonable amount of stack left |
184 | * to work from. | 191 | * to work from. |
185 | */ | 192 | */ |
193 | rlim = current->signal->rlim; | ||
186 | if (size > rlim[RLIMIT_STACK].rlim_cur / 4) { | 194 | if (size > rlim[RLIMIT_STACK].rlim_cur / 4) { |
187 | put_page(page); | 195 | put_page(page); |
188 | return NULL; | 196 | return NULL; |
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 038ed7436199..c6cbb6cd59b2 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c | |||
@@ -369,7 +369,7 @@ out: | |||
369 | 369 | ||
370 | 370 | ||
371 | /** | 371 | /** |
372 | * int journal_restart() - restart a handle . | 372 | * int journal_restart() - restart a handle. |
373 | * @handle: handle to restart | 373 | * @handle: handle to restart |
374 | * @nblocks: nr credits requested | 374 | * @nblocks: nr credits requested |
375 | * | 375 | * |
@@ -844,8 +844,7 @@ out: | |||
844 | } | 844 | } |
845 | 845 | ||
846 | /** | 846 | /** |
847 | * int journal_get_undo_access() - Notify intent to modify metadata with | 847 | * int journal_get_undo_access() - Notify intent to modify metadata with non-rewindable consequences |
848 | * non-rewindable consequences | ||
849 | * @handle: transaction | 848 | * @handle: transaction |
850 | * @bh: buffer to undo | 849 | * @bh: buffer to undo |
851 | * @credits: store the number of taken credits here (if not NULL) | 850 | * @credits: store the number of taken credits here (if not NULL) |
@@ -921,12 +920,14 @@ out: | |||
921 | } | 920 | } |
922 | 921 | ||
923 | /** | 922 | /** |
924 | * int journal_dirty_data() - mark a buffer as containing dirty data which | 923 | * int journal_dirty_data() - mark a buffer as containing dirty data to be flushed |
925 | * needs to be flushed before we can commit the | ||
926 | * current transaction. | ||
927 | * @handle: transaction | 924 | * @handle: transaction |
928 | * @bh: bufferhead to mark | 925 | * @bh: bufferhead to mark |
929 | * | 926 | * |
927 | * Description: | ||
928 | * Mark a buffer as containing dirty data which needs to be flushed before | ||
929 | * we can commit the current transaction. | ||
930 | * | ||
930 | * The buffer is placed on the transaction's data list and is marked as | 931 | * The buffer is placed on the transaction's data list and is marked as |
931 | * belonging to the transaction. | 932 | * belonging to the transaction. |
932 | * | 933 | * |
@@ -1098,11 +1099,11 @@ no_journal: | |||
1098 | } | 1099 | } |
1099 | 1100 | ||
1100 | /** | 1101 | /** |
1101 | * int journal_dirty_metadata() - mark a buffer as containing dirty metadata | 1102 | * int journal_dirty_metadata() - mark a buffer as containing dirty metadata |
1102 | * @handle: transaction to add buffer to. | 1103 | * @handle: transaction to add buffer to. |
1103 | * @bh: buffer to mark | 1104 | * @bh: buffer to mark |
1104 | * | 1105 | * |
1105 | * mark dirty metadata which needs to be journaled as part of the current | 1106 | * Mark dirty metadata which needs to be journaled as part of the current |
1106 | * transaction. | 1107 | * transaction. |
1107 | * | 1108 | * |
1108 | * The buffer is placed on the transaction's metadata list and is marked | 1109 | * The buffer is placed on the transaction's metadata list and is marked |
diff --git a/fs/mpage.c b/fs/mpage.c index 5df564366f36..235e4d3873a8 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -325,16 +325,12 @@ confused: | |||
325 | } | 325 | } |
326 | 326 | ||
327 | /** | 327 | /** |
328 | * mpage_readpages - populate an address space with some pages, and | 328 | * mpage_readpages - populate an address space with some pages & start reads against them |
329 | * start reads against them. | ||
330 | * | ||
331 | * @mapping: the address_space | 329 | * @mapping: the address_space |
332 | * @pages: The address of a list_head which contains the target pages. These | 330 | * @pages: The address of a list_head which contains the target pages. These |
333 | * pages have their ->index populated and are otherwise uninitialised. | 331 | * pages have their ->index populated and are otherwise uninitialised. |
334 | * | ||
335 | * The page at @pages->prev has the lowest file offset, and reads should be | 332 | * The page at @pages->prev has the lowest file offset, and reads should be |
336 | * issued in @pages->prev to @pages->next order. | 333 | * issued in @pages->prev to @pages->next order. |
337 | * | ||
338 | * @nr_pages: The number of pages at *@pages | 334 | * @nr_pages: The number of pages at *@pages |
339 | * @get_block: The filesystem's block mapper function. | 335 | * @get_block: The filesystem's block mapper function. |
340 | * | 336 | * |
@@ -360,6 +356,7 @@ confused: | |||
360 | * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be | 356 | * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be |
361 | * submitted in the following order: | 357 | * submitted in the following order: |
362 | * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 | 358 | * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 |
359 | * | ||
363 | * because the indirect block has to be read to get the mappings of blocks | 360 | * because the indirect block has to be read to get the mappings of blocks |
364 | * 13,14,15,16. Obviously, this impacts performance. | 361 | * 13,14,15,16. Obviously, this impacts performance. |
365 | * | 362 | * |
@@ -656,9 +653,7 @@ out: | |||
656 | } | 653 | } |
657 | 654 | ||
658 | /** | 655 | /** |
659 | * mpage_writepages - walk the list of dirty pages of the given | 656 | * mpage_writepages - walk the list of dirty pages of the given address space & writepage() all of them |
660 | * address space and writepage() all of them. | ||
661 | * | ||
662 | * @mapping: address space structure to write | 657 | * @mapping: address space structure to write |
663 | * @wbc: subtract the number of written pages from *@wbc->nr_to_write | 658 | * @wbc: subtract the number of written pages from *@wbc->nr_to_write |
664 | * @get_block: the filesystem's block mapper function. | 659 | * @get_block: the filesystem's block mapper function. |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 21dfc9da235e..8831d9518790 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -171,7 +171,7 @@ xfs_parseargs( | |||
171 | char *this_char, *value, *eov; | 171 | char *this_char, *value, *eov; |
172 | int dsunit, dswidth, vol_dsunit, vol_dswidth; | 172 | int dsunit, dswidth, vol_dsunit, vol_dswidth; |
173 | int iosize; | 173 | int iosize; |
174 | int ikeep = 0; | 174 | int dmapi_implies_ikeep = 1; |
175 | 175 | ||
176 | args->flags |= XFSMNT_BARRIER; | 176 | args->flags |= XFSMNT_BARRIER; |
177 | args->flags2 |= XFSMNT2_COMPAT_IOSIZE; | 177 | args->flags2 |= XFSMNT2_COMPAT_IOSIZE; |
@@ -302,10 +302,10 @@ xfs_parseargs( | |||
302 | } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) { | 302 | } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) { |
303 | args->flags &= ~XFSMNT_BARRIER; | 303 | args->flags &= ~XFSMNT_BARRIER; |
304 | } else if (!strcmp(this_char, MNTOPT_IKEEP)) { | 304 | } else if (!strcmp(this_char, MNTOPT_IKEEP)) { |
305 | ikeep = 1; | 305 | args->flags |= XFSMNT_IKEEP; |
306 | args->flags &= ~XFSMNT_IDELETE; | ||
307 | } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { | 306 | } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { |
308 | args->flags |= XFSMNT_IDELETE; | 307 | dmapi_implies_ikeep = 0; |
308 | args->flags &= ~XFSMNT_IKEEP; | ||
309 | } else if (!strcmp(this_char, MNTOPT_LARGEIO)) { | 309 | } else if (!strcmp(this_char, MNTOPT_LARGEIO)) { |
310 | args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE; | 310 | args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE; |
311 | } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) { | 311 | } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) { |
@@ -410,8 +410,8 @@ xfs_parseargs( | |||
410 | * Note that if "ikeep" or "noikeep" mount options are | 410 | * Note that if "ikeep" or "noikeep" mount options are |
411 | * supplied, then they are honored. | 411 | * supplied, then they are honored. |
412 | */ | 412 | */ |
413 | if (!(args->flags & XFSMNT_DMAPI) && !ikeep) | 413 | if ((args->flags & XFSMNT_DMAPI) && dmapi_implies_ikeep) |
414 | args->flags |= XFSMNT_IDELETE; | 414 | args->flags |= XFSMNT_IKEEP; |
415 | 415 | ||
416 | if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) { | 416 | if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) { |
417 | if (dsunit) { | 417 | if (dsunit) { |
@@ -446,6 +446,7 @@ xfs_showargs( | |||
446 | { | 446 | { |
447 | static struct proc_xfs_info xfs_info_set[] = { | 447 | static struct proc_xfs_info xfs_info_set[] = { |
448 | /* the few simple ones we can get from the mount struct */ | 448 | /* the few simple ones we can get from the mount struct */ |
449 | { XFS_MOUNT_IKEEP, "," MNTOPT_IKEEP }, | ||
449 | { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC }, | 450 | { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC }, |
450 | { XFS_MOUNT_INO64, "," MNTOPT_INO64 }, | 451 | { XFS_MOUNT_INO64, "," MNTOPT_INO64 }, |
451 | { XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN }, | 452 | { XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN }, |
@@ -461,7 +462,6 @@ xfs_showargs( | |||
461 | }; | 462 | }; |
462 | static struct proc_xfs_info xfs_info_unset[] = { | 463 | static struct proc_xfs_info xfs_info_unset[] = { |
463 | /* the few simple ones we can get from the mount struct */ | 464 | /* the few simple ones we can get from the mount struct */ |
464 | { XFS_MOUNT_IDELETE, "," MNTOPT_IKEEP }, | ||
465 | { XFS_MOUNT_COMPAT_IOSIZE, "," MNTOPT_LARGEIO }, | 465 | { XFS_MOUNT_COMPAT_IOSIZE, "," MNTOPT_LARGEIO }, |
466 | { XFS_MOUNT_BARRIER, "," MNTOPT_NOBARRIER }, | 466 | { XFS_MOUNT_BARRIER, "," MNTOPT_NOBARRIER }, |
467 | { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_64BITINODE }, | 467 | { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_64BITINODE }, |
diff --git a/fs/xfs/xfs_clnt.h b/fs/xfs/xfs_clnt.h index d16c1b971074..d5d1e60ee224 100644 --- a/fs/xfs/xfs_clnt.h +++ b/fs/xfs/xfs_clnt.h | |||
@@ -86,7 +86,7 @@ struct xfs_mount_args { | |||
86 | #define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */ | 86 | #define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */ |
87 | #define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */ | 87 | #define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */ |
88 | #define XFSMNT_BARRIER 0x04000000 /* use write barriers */ | 88 | #define XFSMNT_BARRIER 0x04000000 /* use write barriers */ |
89 | #define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */ | 89 | #define XFSMNT_IKEEP 0x08000000 /* inode cluster delete */ |
90 | #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width | 90 | #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width |
91 | * allocation */ | 91 | * allocation */ |
92 | #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename | 92 | #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index c5836b951d0c..db9d5fa600af 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -1053,7 +1053,7 @@ xfs_difree( | |||
1053 | /* | 1053 | /* |
1054 | * When an inode cluster is free, it becomes eligible for removal | 1054 | * When an inode cluster is free, it becomes eligible for removal |
1055 | */ | 1055 | */ |
1056 | if ((mp->m_flags & XFS_MOUNT_IDELETE) && | 1056 | if (!(mp->m_flags & XFS_MOUNT_IKEEP) && |
1057 | (rec.ir_freecount == XFS_IALLOC_INODES(mp))) { | 1057 | (rec.ir_freecount == XFS_IALLOC_INODES(mp))) { |
1058 | 1058 | ||
1059 | *delete = 1; | 1059 | *delete = 1; |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index f7c620ec6e69..1d8a4728d847 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -366,7 +366,7 @@ typedef struct xfs_mount { | |||
366 | #define XFS_MOUNT_SMALL_INUMS (1ULL << 15) /* users wants 32bit inodes */ | 366 | #define XFS_MOUNT_SMALL_INUMS (1ULL << 15) /* users wants 32bit inodes */ |
367 | #define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */ | 367 | #define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */ |
368 | #define XFS_MOUNT_BARRIER (1ULL << 17) | 368 | #define XFS_MOUNT_BARRIER (1ULL << 17) |
369 | #define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/ | 369 | #define XFS_MOUNT_IKEEP (1ULL << 18) /* keep empty inode clusters*/ |
370 | #define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width | 370 | #define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width |
371 | * allocation */ | 371 | * allocation */ |
372 | #define XFS_MOUNT_RDONLY (1ULL << 20) /* read-only fs */ | 372 | #define XFS_MOUNT_RDONLY (1ULL << 20) /* read-only fs */ |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 413587f02155..7321304a69cc 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -281,8 +281,8 @@ xfs_start_flags( | |||
281 | mp->m_readio_log = mp->m_writeio_log = ap->iosizelog; | 281 | mp->m_readio_log = mp->m_writeio_log = ap->iosizelog; |
282 | } | 282 | } |
283 | 283 | ||
284 | if (ap->flags & XFSMNT_IDELETE) | 284 | if (ap->flags & XFSMNT_IKEEP) |
285 | mp->m_flags |= XFS_MOUNT_IDELETE; | 285 | mp->m_flags |= XFS_MOUNT_IKEEP; |
286 | if (ap->flags & XFSMNT_DIRSYNC) | 286 | if (ap->flags & XFSMNT_DIRSYNC) |
287 | mp->m_flags |= XFS_MOUNT_DIRSYNC; | 287 | mp->m_flags |= XFS_MOUNT_DIRSYNC; |
288 | if (ap->flags & XFSMNT_ATTR2) | 288 | if (ap->flags & XFSMNT_ATTR2) |