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: ext2: Resolve 'dereferencing pointer to incomplete type' when enabling EXT2_XATTR_DEBUG ext3: Remove redundant unlikely() ext2: Remove redundant unlikely() ext3: speed up file creates by optimizing rec_len functions ext2: speed up file creates by optimizing rec_len functions ext3: Add more journal error check ext3: Add journal error check in resize.c quota: Use %pV and __attribute__((format (printf in __quota_error and fix fallout ext3: Add FITRIM handling ext3: Add batched discard support for ext3 ext3: Add journal error check into ext3_rename() ext3: Use search_dirblock() in ext3_dx_find_entry() ext3: Avoid uninitialized memory references with a corrupted htree directory ext3: Return error code from generic_check_addressable ext3: Add journal error check into ext3_delete_entry() ext3: Add error check in ext3_mkdir() fs/ext3/super.c: Use printf extension %pV fs/ext2/super.c: Use printf extension %pV ext3: don't update sb journal_devnum when RO dev
This commit is contained in:
@@ -724,21 +724,30 @@ struct ext3_dir_entry_2 {
|
||||
~EXT3_DIR_ROUND)
|
||||
#define EXT3_MAX_REC_LEN ((1<<16)-1)
|
||||
|
||||
/*
|
||||
* Tests against MAX_REC_LEN etc were put in place for 64k block
|
||||
* sizes; if that is not possible on this arch, we can skip
|
||||
* those tests and speed things up.
|
||||
*/
|
||||
static inline unsigned ext3_rec_len_from_disk(__le16 dlen)
|
||||
{
|
||||
unsigned len = le16_to_cpu(dlen);
|
||||
|
||||
#if (PAGE_CACHE_SIZE >= 65536)
|
||||
if (len == EXT3_MAX_REC_LEN)
|
||||
return 1 << 16;
|
||||
#endif
|
||||
return len;
|
||||
}
|
||||
|
||||
static inline __le16 ext3_rec_len_to_disk(unsigned len)
|
||||
{
|
||||
#if (PAGE_CACHE_SIZE >= 65536)
|
||||
if (len == (1 << 16))
|
||||
return cpu_to_le16(EXT3_MAX_REC_LEN);
|
||||
else if (len > (1 << 16))
|
||||
BUG();
|
||||
#endif
|
||||
return cpu_to_le16(len);
|
||||
}
|
||||
|
||||
@@ -856,6 +865,7 @@ extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
|
||||
extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);
|
||||
extern void ext3_init_block_alloc_info(struct inode *);
|
||||
extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv);
|
||||
extern int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range);
|
||||
|
||||
/* dir.c */
|
||||
extern int ext3_check_dir_entry(const char *, struct inode *,
|
||||
|
||||
@@ -18,6 +18,17 @@ struct mb_cache_entry {
|
||||
} e_index;
|
||||
};
|
||||
|
||||
struct mb_cache {
|
||||
struct list_head c_cache_list;
|
||||
const char *c_name;
|
||||
atomic_t c_entry_count;
|
||||
int c_max_entries;
|
||||
int c_bucket_bits;
|
||||
struct kmem_cache *c_entry_cache;
|
||||
struct list_head *c_block_hash;
|
||||
struct list_head *c_index_hash;
|
||||
};
|
||||
|
||||
/* Functions on caches */
|
||||
|
||||
struct mb_cache *mb_cache_create(const char *, int);
|
||||
|
||||
@@ -31,8 +31,9 @@ static inline bool is_quota_modification(struct inode *inode, struct iattr *ia)
|
||||
#define quota_error(sb, fmt, args...) \
|
||||
__quota_error((sb), __func__, fmt , ## args)
|
||||
|
||||
extern void __quota_error(struct super_block *sb, const char *func,
|
||||
const char *fmt, ...);
|
||||
extern __attribute__((format (printf, 3, 4)))
|
||||
void __quota_error(struct super_block *sb, const char *func,
|
||||
const char *fmt, ...);
|
||||
|
||||
/*
|
||||
* declaration of quota_function calls in kernel.
|
||||
|
||||
Reference in New Issue
Block a user