mirror of https://gitee.com/openkylin/linux.git
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: ext4: fix typo which broke '..' detection in ext4_find_entry() ext4: Turn off multiple page-io submission by default
This commit is contained in:
commit
a4851d8f7d
|
@ -910,6 +910,7 @@ struct ext4_inode_info {
|
||||||
#define EXT4_MOUNT_JOURNAL_CHECKSUM 0x800000 /* Journal checksums */
|
#define EXT4_MOUNT_JOURNAL_CHECKSUM 0x800000 /* Journal checksums */
|
||||||
#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */
|
#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT 0x1000000 /* Journal Async Commit */
|
||||||
#define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */
|
#define EXT4_MOUNT_I_VERSION 0x2000000 /* i_version support */
|
||||||
|
#define EXT4_MOUNT_MBLK_IO_SUBMIT 0x4000000 /* multi-block io submits */
|
||||||
#define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */
|
#define EXT4_MOUNT_DELALLOC 0x8000000 /* Delalloc support */
|
||||||
#define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */
|
#define EXT4_MOUNT_DATA_ERR_ABORT 0x10000000 /* Abort on file data write */
|
||||||
#define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */
|
#define EXT4_MOUNT_BLOCK_VALIDITY 0x20000000 /* Block validity checking */
|
||||||
|
|
|
@ -2125,9 +2125,12 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
|
||||||
*/
|
*/
|
||||||
if (unlikely(journal_data && PageChecked(page)))
|
if (unlikely(journal_data && PageChecked(page)))
|
||||||
err = __ext4_journalled_writepage(page, len);
|
err = __ext4_journalled_writepage(page, len);
|
||||||
else
|
else if (test_opt(inode->i_sb, MBLK_IO_SUBMIT))
|
||||||
err = ext4_bio_write_page(&io_submit, page,
|
err = ext4_bio_write_page(&io_submit, page,
|
||||||
len, mpd->wbc);
|
len, mpd->wbc);
|
||||||
|
else
|
||||||
|
err = block_write_full_page(page,
|
||||||
|
noalloc_get_block_write, mpd->wbc);
|
||||||
|
|
||||||
if (!err)
|
if (!err)
|
||||||
mpd->pages_written++;
|
mpd->pages_written++;
|
||||||
|
|
|
@ -872,7 +872,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
|
||||||
if (namelen > EXT4_NAME_LEN)
|
if (namelen > EXT4_NAME_LEN)
|
||||||
return NULL;
|
return NULL;
|
||||||
if ((namelen <= 2) && (name[0] == '.') &&
|
if ((namelen <= 2) && (name[0] == '.') &&
|
||||||
(name[1] == '.' || name[1] == '0')) {
|
(name[1] == '.' || name[1] == '\0')) {
|
||||||
/*
|
/*
|
||||||
* "." or ".." will only be in the first block
|
* "." or ".." will only be in the first block
|
||||||
* NFS may look up ".."; "." should be handled by the VFS
|
* NFS may look up ".."; "." should be handled by the VFS
|
||||||
|
|
|
@ -1026,6 +1026,8 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
|
||||||
!(def_mount_opts & EXT4_DEFM_NODELALLOC))
|
!(def_mount_opts & EXT4_DEFM_NODELALLOC))
|
||||||
seq_puts(seq, ",nodelalloc");
|
seq_puts(seq, ",nodelalloc");
|
||||||
|
|
||||||
|
if (test_opt(sb, MBLK_IO_SUBMIT))
|
||||||
|
seq_puts(seq, ",mblk_io_submit");
|
||||||
if (sbi->s_stripe)
|
if (sbi->s_stripe)
|
||||||
seq_printf(seq, ",stripe=%lu", sbi->s_stripe);
|
seq_printf(seq, ",stripe=%lu", sbi->s_stripe);
|
||||||
/*
|
/*
|
||||||
|
@ -1239,8 +1241,8 @@ enum {
|
||||||
Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
|
Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
|
||||||
Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
|
Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
|
||||||
Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
|
Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
|
||||||
Opt_stripe, Opt_delalloc, Opt_nodelalloc,
|
Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_mblk_io_submit,
|
||||||
Opt_block_validity, Opt_noblock_validity,
|
Opt_nomblk_io_submit, Opt_block_validity, Opt_noblock_validity,
|
||||||
Opt_inode_readahead_blks, Opt_journal_ioprio,
|
Opt_inode_readahead_blks, Opt_journal_ioprio,
|
||||||
Opt_dioread_nolock, Opt_dioread_lock,
|
Opt_dioread_nolock, Opt_dioread_lock,
|
||||||
Opt_discard, Opt_nodiscard,
|
Opt_discard, Opt_nodiscard,
|
||||||
|
@ -1304,6 +1306,8 @@ static const match_table_t tokens = {
|
||||||
{Opt_resize, "resize"},
|
{Opt_resize, "resize"},
|
||||||
{Opt_delalloc, "delalloc"},
|
{Opt_delalloc, "delalloc"},
|
||||||
{Opt_nodelalloc, "nodelalloc"},
|
{Opt_nodelalloc, "nodelalloc"},
|
||||||
|
{Opt_mblk_io_submit, "mblk_io_submit"},
|
||||||
|
{Opt_nomblk_io_submit, "nomblk_io_submit"},
|
||||||
{Opt_block_validity, "block_validity"},
|
{Opt_block_validity, "block_validity"},
|
||||||
{Opt_noblock_validity, "noblock_validity"},
|
{Opt_noblock_validity, "noblock_validity"},
|
||||||
{Opt_inode_readahead_blks, "inode_readahead_blks=%u"},
|
{Opt_inode_readahead_blks, "inode_readahead_blks=%u"},
|
||||||
|
@ -1725,6 +1729,12 @@ static int parse_options(char *options, struct super_block *sb,
|
||||||
case Opt_nodelalloc:
|
case Opt_nodelalloc:
|
||||||
clear_opt(sbi->s_mount_opt, DELALLOC);
|
clear_opt(sbi->s_mount_opt, DELALLOC);
|
||||||
break;
|
break;
|
||||||
|
case Opt_mblk_io_submit:
|
||||||
|
set_opt(sbi->s_mount_opt, MBLK_IO_SUBMIT);
|
||||||
|
break;
|
||||||
|
case Opt_nomblk_io_submit:
|
||||||
|
clear_opt(sbi->s_mount_opt, MBLK_IO_SUBMIT);
|
||||||
|
break;
|
||||||
case Opt_stripe:
|
case Opt_stripe:
|
||||||
if (match_int(&args[0], &option))
|
if (match_int(&args[0], &option))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue