Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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:
[PATCH] ext4: retry failed direct IO allocations
ext4: Fix build warning in ext4_dirty_inode()
ext4: drop ext4dev compat
ext4: fix a BUG_ON crash by checking that page has buffers attached to it

+15 -58
-14
fs/ext4/Kconfig
··· 26 26 27 27 If unsure, say N. 28 28 29 - config EXT4DEV_COMPAT 30 - bool "Enable ext4dev compatibility" 31 - depends on EXT4_FS 32 - help 33 - Starting with 2.6.28, the name of the ext4 filesystem was 34 - renamed from ext4dev to ext4. Unfortunately there are some 35 - legacy userspace programs (such as klibc's fstype) have 36 - "ext4dev" hardcoded. 37 - 38 - To enable backwards compatibility so that systems that are 39 - still expecting to mount ext4 filesystems using ext4dev, 40 - choose Y here. This feature will go away by 2.6.31, so 41 - please arrange to get your userspace programs fixed! 42 - 43 29 config EXT4_FS_XATTR 44 30 bool "Ext4 extended attributes" 45 31 depends on EXT4_FS
+15 -13
fs/ext4/inode.c
··· 1146 1146 } 1147 1147 1148 1148 /* 1149 - * Return the number of dirty pages in the given inode starting at 1150 - * page frame idx. 1149 + * Return the number of contiguous dirty pages in a given inode 1150 + * starting at page frame idx. 1151 1151 */ 1152 1152 static pgoff_t ext4_num_dirty_pages(struct inode *inode, pgoff_t idx, 1153 1153 unsigned int max_pages) ··· 1181 1181 unlock_page(page); 1182 1182 break; 1183 1183 } 1184 - head = page_buffers(page); 1185 - bh = head; 1186 - do { 1187 - if (!buffer_delay(bh) && 1188 - !buffer_unwritten(bh)) { 1189 - done = 1; 1190 - break; 1191 - } 1192 - } while ((bh = bh->b_this_page) != head); 1184 + if (page_has_buffers(page)) { 1185 + bh = head = page_buffers(page); 1186 + do { 1187 + if (!buffer_delay(bh) && 1188 + !buffer_unwritten(bh)) 1189 + done = 1; 1190 + bh = bh->b_this_page; 1191 + } while (!done && (bh != head)); 1192 + } 1193 1193 unlock_page(page); 1194 1194 if (done) 1195 1195 break; ··· 3378 3378 ssize_t ret; 3379 3379 int orphan = 0; 3380 3380 size_t count = iov_length(iov, nr_segs); 3381 + int retries = 0; 3381 3382 3382 3383 if (rw == WRITE) { 3383 3384 loff_t final_size = offset + count; ··· 3401 3400 } 3402 3401 } 3403 3402 3403 + retry: 3404 3404 ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 3405 3405 offset, nr_segs, 3406 3406 ext4_get_block, NULL); 3407 + if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries)) 3408 + goto retry; 3407 3409 3408 3410 if (orphan) { 3409 3411 int err; ··· 5616 5612 */ 5617 5613 void ext4_dirty_inode(struct inode *inode) 5618 5614 { 5619 - handle_t *current_handle = ext4_journal_current_handle(); 5620 5615 handle_t *handle; 5621 5616 5622 5617 handle = ext4_journal_start(inode, 2); 5623 5618 if (IS_ERR(handle)) 5624 5619 goto out; 5625 5620 5626 - jbd_debug(5, "marking dirty. outer handle=%p\n", current_handle); 5627 5621 ext4_mark_inode_dirty(handle, inode); 5628 5622 5629 5623 ext4_journal_stop(handle);
-31
fs/ext4/super.c
··· 3966 3966 .fs_flags = FS_REQUIRES_DEV, 3967 3967 }; 3968 3968 3969 - #ifdef CONFIG_EXT4DEV_COMPAT 3970 - static int ext4dev_get_sb(struct file_system_type *fs_type, int flags, 3971 - const char *dev_name, void *data,struct vfsmount *mnt) 3972 - { 3973 - printk(KERN_WARNING "EXT4-fs (%s): Update your userspace programs " 3974 - "to mount using ext4\n", dev_name); 3975 - printk(KERN_WARNING "EXT4-fs (%s): ext4dev backwards compatibility " 3976 - "will go away by 2.6.31\n", dev_name); 3977 - return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super,mnt); 3978 - } 3979 - 3980 - static struct file_system_type ext4dev_fs_type = { 3981 - .owner = THIS_MODULE, 3982 - .name = "ext4dev", 3983 - .get_sb = ext4dev_get_sb, 3984 - .kill_sb = kill_block_super, 3985 - .fs_flags = FS_REQUIRES_DEV, 3986 - }; 3987 - MODULE_ALIAS("ext4dev"); 3988 - #endif 3989 - 3990 3969 static int __init init_ext4_fs(void) 3991 3970 { 3992 3971 int err; ··· 3990 4011 err = register_filesystem(&ext4_fs_type); 3991 4012 if (err) 3992 4013 goto out; 3993 - #ifdef CONFIG_EXT4DEV_COMPAT 3994 - err = register_filesystem(&ext4dev_fs_type); 3995 - if (err) { 3996 - unregister_filesystem(&ext4_fs_type); 3997 - goto out; 3998 - } 3999 - #endif 4000 4014 return 0; 4001 4015 out: 4002 4016 destroy_inodecache(); ··· 4008 4036 static void __exit exit_ext4_fs(void) 4009 4037 { 4010 4038 unregister_filesystem(&ext4_fs_type); 4011 - #ifdef CONFIG_EXT4DEV_COMPAT 4012 - unregister_filesystem(&ext4dev_fs_type); 4013 - #endif 4014 4039 destroy_inodecache(); 4015 4040 exit_ext4_xattr(); 4016 4041 exit_ext4_mballoc();