aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-16 20:33:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-16 20:33:01 -0500
commit36cd5c19c3fe8291fac45a262c44c00bd14b531a (patch)
tree77813e551c82546c9f6cddc8a3216ba5d02807ed /include/linux
parent2a74dbb9a86e8102dcd07d284135b4530a84826e (diff)
parentbd9926e80330d43f15b710c2935fa41b792d56fd (diff)
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 update from Ted Ts'o: "There are two major features for this merge window. The first is inline data, which allows small files or directories to be stored in the in-inode extended attribute area. (This requires that the file system use inodes which are at least 256 bytes or larger; 128 byte inodes do not have any room for in-inode xattrs.) The second new feature is SEEK_HOLE/SEEK_DATA support. This is enabled by the extent status tree patches, and this infrastructure will be used to further optimize ext4 in the future. Beyond that, we have the usual collection of code cleanups and bug fixes." * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (63 commits) ext4: zero out inline data using memset() instead of empty_zero_page ext4: ensure Inode flags consistency are checked at build time ext4: Remove CONFIG_EXT4_FS_XATTR ext4: remove unused variable from ext4_ext_in_cache() ext4: remove redundant initialization in ext4_fill_super() ext4: remove redundant code in ext4_alloc_inode() ext4: use sync_inode_metadata() when syncing inode metadata ext4: enable ext4 inline support ext4: let fallocate handle inline data correctly ext4: let ext4_truncate handle inline data correctly ext4: evict inline data out if we need to strore xattr in inode ext4: let fiemap work with inline data ext4: let ext4_rename handle inline dir ext4: let empty_dir handle inline dir ext4: let ext4_delete_entry() handle inline data ext4: make ext4_delete_entry generic ext4: let ext4_find_entry handle inline data ext4: create a new function search_dir ext4: let ext4_readdir handle inline data ext4: let add_dir_entry handle inline data properly ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/jbd2.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 3efc43f3f162..1be23d9fdacb 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1096,7 +1096,6 @@ extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *);
1096void jbd2_journal_set_triggers(struct buffer_head *, 1096void jbd2_journal_set_triggers(struct buffer_head *,
1097 struct jbd2_buffer_trigger_type *type); 1097 struct jbd2_buffer_trigger_type *type);
1098extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); 1098extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *);
1099extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *);
1100extern int jbd2_journal_forget (handle_t *, struct buffer_head *); 1099extern int jbd2_journal_forget (handle_t *, struct buffer_head *);
1101extern void journal_sync_buffer (struct buffer_head *); 1100extern void journal_sync_buffer (struct buffer_head *);
1102extern void jbd2_journal_invalidatepage(journal_t *, 1101extern void jbd2_journal_invalidatepage(journal_t *,
@@ -1303,15 +1302,21 @@ static inline int jbd_space_needed(journal_t *journal)
1303 1302
1304extern int jbd_blocks_per_page(struct inode *inode); 1303extern int jbd_blocks_per_page(struct inode *inode);
1305 1304
1305/* JBD uses a CRC32 checksum */
1306#define JBD_MAX_CHECKSUM_SIZE 4
1307
1306static inline u32 jbd2_chksum(journal_t *journal, u32 crc, 1308static inline u32 jbd2_chksum(journal_t *journal, u32 crc,
1307 const void *address, unsigned int length) 1309 const void *address, unsigned int length)
1308{ 1310{
1309 struct { 1311 struct {
1310 struct shash_desc shash; 1312 struct shash_desc shash;
1311 char ctx[crypto_shash_descsize(journal->j_chksum_driver)]; 1313 char ctx[JBD_MAX_CHECKSUM_SIZE];
1312 } desc; 1314 } desc;
1313 int err; 1315 int err;
1314 1316
1317 BUG_ON(crypto_shash_descsize(journal->j_chksum_driver) >
1318 JBD_MAX_CHECKSUM_SIZE);
1319
1315 desc.shash.tfm = journal->j_chksum_driver; 1320 desc.shash.tfm = journal->j_chksum_driver;
1316 desc.shash.flags = 0; 1321 desc.shash.flags = 0;
1317 *(u32 *)desc.ctx = crc; 1322 *(u32 *)desc.ctx = crc;