diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 20:14:59 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 20:14:59 -0500 |
| commit | 2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (patch) | |
| tree | f72a0d85e66f500b4cead348a231e3d3b9f357bc /include/linux | |
| parent | cd764695b67386a81964f68e9c66efd9f13f4d29 (diff) | |
| parent | 4b905671d2ea09fd48fed72c581df17e40823f39 (diff) | |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (57 commits)
jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
ext4: Remove "extents" mount option
block: Add Kconfig help which notes that ext4 needs CONFIG_LBD
ext4: Make printk's consistently prefixed with "EXT4-fs: "
ext4: Add sanity checks for the superblock before mounting the filesystem
ext4: Add mount option to set kjournald's I/O priority
jbd2: Submit writes to the journal using WRITE_SYNC
jbd2: Add pid and journal device name to the "kjournald2 starting" message
ext4: Add markers for better debuggability
ext4: Remove code to create the journal inode
ext4: provide function to release metadata pages under memory pressure
ext3: provide function to release metadata pages under memory pressure
add releasepage hooks to block devices which can be used by file systems
ext4: Fix s_dirty_blocks_counter if block allocation failed with nodelalloc
ext4: Init the complete page while building buddy cache
ext4: Don't allow new groups to be added during block allocation
ext4: mark the blocks/inode bitmap beyond end of group as used
ext4: Use new buffer_head flag to check uninit group bitmaps initialization
ext4: Fix the race between read_inode_bitmap() and ext4_new_inode()
ext4: code cleanup
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ext3_fs.h | 28 | ||||
| -rw-r--r-- | include/linux/ext3_fs_sb.h | 1 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/ioprio.h | 2 | ||||
| -rw-r--r-- | include/linux/jbd2.h | 38 |
5 files changed, 67 insertions, 4 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index d76800f6ecf0..dd495b8c3091 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -378,6 +378,13 @@ struct ext3_inode { | |||
| 378 | #define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */ | 378 | #define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */ |
| 379 | 379 | ||
| 380 | /* | 380 | /* |
| 381 | * Misc. filesystem flags | ||
| 382 | */ | ||
| 383 | #define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */ | ||
| 384 | #define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */ | ||
| 385 | #define EXT2_FLAGS_TEST_FILESYS 0x0004 /* to test development code */ | ||
| 386 | |||
| 387 | /* | ||
| 381 | * Mount flags | 388 | * Mount flags |
| 382 | */ | 389 | */ |
| 383 | #define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */ | 390 | #define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */ |
| @@ -513,7 +520,23 @@ struct ext3_super_block { | |||
| 513 | __u16 s_reserved_word_pad; | 520 | __u16 s_reserved_word_pad; |
| 514 | __le32 s_default_mount_opts; | 521 | __le32 s_default_mount_opts; |
| 515 | __le32 s_first_meta_bg; /* First metablock block group */ | 522 | __le32 s_first_meta_bg; /* First metablock block group */ |
| 516 | __u32 s_reserved[190]; /* Padding to the end of the block */ | 523 | __le32 s_mkfs_time; /* When the filesystem was created */ |
| 524 | __le32 s_jnl_blocks[17]; /* Backup of the journal inode */ | ||
| 525 | /* 64bit support valid if EXT4_FEATURE_COMPAT_64BIT */ | ||
| 526 | /*150*/ __le32 s_blocks_count_hi; /* Blocks count */ | ||
| 527 | __le32 s_r_blocks_count_hi; /* Reserved blocks count */ | ||
| 528 | __le32 s_free_blocks_count_hi; /* Free blocks count */ | ||
| 529 | __le16 s_min_extra_isize; /* All inodes have at least # bytes */ | ||
| 530 | __le16 s_want_extra_isize; /* New inodes should reserve # bytes */ | ||
| 531 | __le32 s_flags; /* Miscellaneous flags */ | ||
| 532 | __le16 s_raid_stride; /* RAID stride */ | ||
| 533 | __le16 s_mmp_interval; /* # seconds to wait in MMP checking */ | ||
| 534 | __le64 s_mmp_block; /* Block for multi-mount protection */ | ||
| 535 | __le32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/ | ||
| 536 | __u8 s_log_groups_per_flex; /* FLEX_BG group size */ | ||
| 537 | __u8 s_reserved_char_pad2; | ||
| 538 | __le16 s_reserved_pad; | ||
| 539 | __u32 s_reserved[162]; /* Padding to the end of the block */ | ||
| 517 | }; | 540 | }; |
| 518 | 541 | ||
| 519 | #ifdef __KERNEL__ | 542 | #ifdef __KERNEL__ |
| @@ -718,6 +741,9 @@ static inline __le16 ext3_rec_len_to_disk(unsigned len) | |||
| 718 | #define DX_HASH_LEGACY 0 | 741 | #define DX_HASH_LEGACY 0 |
| 719 | #define DX_HASH_HALF_MD4 1 | 742 | #define DX_HASH_HALF_MD4 1 |
| 720 | #define DX_HASH_TEA 2 | 743 | #define DX_HASH_TEA 2 |
| 744 | #define DX_HASH_LEGACY_UNSIGNED 3 | ||
| 745 | #define DX_HASH_HALF_MD4_UNSIGNED 4 | ||
| 746 | #define DX_HASH_TEA_UNSIGNED 5 | ||
| 721 | 747 | ||
| 722 | #ifdef __KERNEL__ | 748 | #ifdef __KERNEL__ |
| 723 | 749 | ||
diff --git a/include/linux/ext3_fs_sb.h b/include/linux/ext3_fs_sb.h index 76fdc0f4b028..f07f34de2f0e 100644 --- a/include/linux/ext3_fs_sb.h +++ b/include/linux/ext3_fs_sb.h | |||
| @@ -57,6 +57,7 @@ struct ext3_sb_info { | |||
| 57 | u32 s_next_generation; | 57 | u32 s_next_generation; |
| 58 | u32 s_hash_seed[4]; | 58 | u32 s_hash_seed[4]; |
| 59 | int s_def_hash_version; | 59 | int s_def_hash_version; |
| 60 | int s_hash_unsigned; /* 3 if hash should be signed, 0 if not */ | ||
| 60 | struct percpu_counter s_freeblocks_counter; | 61 | struct percpu_counter s_freeblocks_counter; |
| 61 | struct percpu_counter s_freeinodes_counter; | 62 | struct percpu_counter s_freeinodes_counter; |
| 62 | struct percpu_counter s_dirs_counter; | 63 | struct percpu_counter s_dirs_counter; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index e38a64d71eff..0b87b29f4797 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -565,6 +565,7 @@ struct address_space { | |||
| 565 | struct block_device { | 565 | struct block_device { |
| 566 | dev_t bd_dev; /* not a kdev_t - it's a search key */ | 566 | dev_t bd_dev; /* not a kdev_t - it's a search key */ |
| 567 | struct inode * bd_inode; /* will die */ | 567 | struct inode * bd_inode; /* will die */ |
| 568 | struct super_block * bd_super; | ||
| 568 | int bd_openers; | 569 | int bd_openers; |
| 569 | struct mutex bd_mutex; /* open/close mutex */ | 570 | struct mutex bd_mutex; /* open/close mutex */ |
| 570 | struct semaphore bd_mount_sem; | 571 | struct semaphore bd_mount_sem; |
| @@ -1389,6 +1390,7 @@ struct super_operations { | |||
| 1389 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 1390 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
| 1390 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1391 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
| 1391 | #endif | 1392 | #endif |
| 1393 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); | ||
| 1392 | }; | 1394 | }; |
| 1393 | 1395 | ||
| 1394 | /* | 1396 | /* |
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index f98a656b17e5..76dad4808847 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
| @@ -86,4 +86,6 @@ static inline int task_nice_ioclass(struct task_struct *task) | |||
| 86 | */ | 86 | */ |
| 87 | extern int ioprio_best(unsigned short aprio, unsigned short bprio); | 87 | extern int ioprio_best(unsigned short aprio, unsigned short bprio); |
| 88 | 88 | ||
| 89 | extern int set_task_ioprio(struct task_struct *task, int ioprio); | ||
| 90 | |||
| 89 | #endif | 91 | #endif |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 34456476e761..b45109c61fba 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -638,6 +638,11 @@ struct transaction_s | |||
| 638 | unsigned long t_expires; | 638 | unsigned long t_expires; |
| 639 | 639 | ||
| 640 | /* | 640 | /* |
| 641 | * When this transaction started, in nanoseconds [no locking] | ||
| 642 | */ | ||
| 643 | ktime_t t_start_time; | ||
| 644 | |||
| 645 | /* | ||
| 641 | * How many handles used this transaction? [t_handle_lock] | 646 | * How many handles used this transaction? [t_handle_lock] |
| 642 | */ | 647 | */ |
| 643 | int t_handle_count; | 648 | int t_handle_count; |
| @@ -682,6 +687,8 @@ jbd2_time_diff(unsigned long start, unsigned long end) | |||
| 682 | return end + (MAX_JIFFY_OFFSET - start); | 687 | return end + (MAX_JIFFY_OFFSET - start); |
| 683 | } | 688 | } |
| 684 | 689 | ||
| 690 | #define JBD2_NR_BATCH 64 | ||
| 691 | |||
| 685 | /** | 692 | /** |
| 686 | * struct journal_s - The journal_s type is the concrete type associated with | 693 | * struct journal_s - The journal_s type is the concrete type associated with |
| 687 | * journal_t. | 694 | * journal_t. |
| @@ -826,6 +833,14 @@ struct journal_s | |||
| 826 | struct mutex j_checkpoint_mutex; | 833 | struct mutex j_checkpoint_mutex; |
| 827 | 834 | ||
| 828 | /* | 835 | /* |
| 836 | * List of buffer heads used by the checkpoint routine. This | ||
| 837 | * was moved from jbd2_log_do_checkpoint() to reduce stack | ||
| 838 | * usage. Access to this array is controlled by the | ||
| 839 | * j_checkpoint_mutex. [j_checkpoint_mutex] | ||
| 840 | */ | ||
| 841 | struct buffer_head *j_chkpt_bhs[JBD2_NR_BATCH]; | ||
| 842 | |||
| 843 | /* | ||
| 829 | * Journal head: identifies the first unused block in the journal. | 844 | * Journal head: identifies the first unused block in the journal. |
| 830 | * [j_state_lock] | 845 | * [j_state_lock] |
| 831 | */ | 846 | */ |
| @@ -939,8 +954,26 @@ struct journal_s | |||
| 939 | struct buffer_head **j_wbuf; | 954 | struct buffer_head **j_wbuf; |
| 940 | int j_wbufsize; | 955 | int j_wbufsize; |
| 941 | 956 | ||
| 957 | /* | ||
| 958 | * this is the pid of hte last person to run a synchronous operation | ||
| 959 | * through the journal | ||
| 960 | */ | ||
| 942 | pid_t j_last_sync_writer; | 961 | pid_t j_last_sync_writer; |
| 943 | 962 | ||
| 963 | /* | ||
| 964 | * the average amount of time in nanoseconds it takes to commit a | ||
| 965 | * transaction to disk. [j_state_lock] | ||
| 966 | */ | ||
| 967 | u64 j_average_commit_time; | ||
| 968 | |||
| 969 | /* | ||
| 970 | * minimum and maximum times that we should wait for | ||
| 971 | * additional filesystem operations to get batched into a | ||
| 972 | * synchronous handle in microseconds | ||
| 973 | */ | ||
| 974 | u32 j_min_batch_time; | ||
| 975 | u32 j_max_batch_time; | ||
| 976 | |||
| 944 | /* This function is called when a transaction is closed */ | 977 | /* This function is called when a transaction is closed */ |
| 945 | void (*j_commit_callback)(journal_t *, | 978 | void (*j_commit_callback)(journal_t *, |
| 946 | transaction_t *); | 979 | transaction_t *); |
| @@ -1102,7 +1135,6 @@ extern int jbd2_journal_set_features | |||
| 1102 | (journal_t *, unsigned long, unsigned long, unsigned long); | 1135 | (journal_t *, unsigned long, unsigned long, unsigned long); |
| 1103 | extern void jbd2_journal_clear_features | 1136 | extern void jbd2_journal_clear_features |
| 1104 | (journal_t *, unsigned long, unsigned long, unsigned long); | 1137 | (journal_t *, unsigned long, unsigned long, unsigned long); |
| 1105 | extern int jbd2_journal_create (journal_t *); | ||
| 1106 | extern int jbd2_journal_load (journal_t *journal); | 1138 | extern int jbd2_journal_load (journal_t *journal); |
| 1107 | extern int jbd2_journal_destroy (journal_t *); | 1139 | extern int jbd2_journal_destroy (journal_t *); |
| 1108 | extern int jbd2_journal_recover (journal_t *journal); | 1140 | extern int jbd2_journal_recover (journal_t *journal); |
| @@ -1177,8 +1209,8 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid); | |||
| 1177 | int jbd2_log_do_checkpoint(journal_t *journal); | 1209 | int jbd2_log_do_checkpoint(journal_t *journal); |
| 1178 | 1210 | ||
| 1179 | void __jbd2_log_wait_for_space(journal_t *journal); | 1211 | void __jbd2_log_wait_for_space(journal_t *journal); |
| 1180 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); | 1212 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); |
| 1181 | extern int jbd2_cleanup_journal_tail(journal_t *); | 1213 | extern int jbd2_cleanup_journal_tail(journal_t *); |
| 1182 | 1214 | ||
| 1183 | /* Debugging code only: */ | 1215 | /* Debugging code only: */ |
| 1184 | 1216 | ||
