From: Ric Wheeler <rwheeler@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: Lukas Czerner <lczerner@redhat.com>,
linux-ext4@vger.kernel.org, jmoyer@redhat.com,
eshishki@redhat.com, sandeen@redhat.com
Subject: Re: [PATCH 1/2] Add discard/nodiscard mount option for ext3
Date: Mon, 12 Jul 2010 11:27:32 -0400 [thread overview]
Message-ID: <4C3B3464.9080505@redhat.com> (raw)
In-Reply-To: <20100712151921.GA19433@atrey.karlin.mff.cuni.cz>
On 07/12/2010 11:19 AM, Jan Kara wrote:
>> Those mount option has the same meaning as in ext4 file system. It
>> provide a way to enable/disable file system's trim support. The trim
>> support is off by default, thus nodiscard option is not actually
>> necessary.
> I kind of miss why ext3 should have a 'discard' mount option. When
> user calls DISCARD ioctl on the filesystem, then he probably wants
> discard to be performed.
>
> Honza
Did you see Lukas' second patch for batched discards in ext3?
Ric
>
>> Signed-off-by: Lukas Czerner<lczerner@redhat.com>
>> ---
>> fs/ext3/super.c | 14 +++++++++++++-
>> include/linux/ext3_fs.h | 1 +
>> 2 files changed, 14 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/ext3/super.c b/fs/ext3/super.c
>> index 1bee604..6baf7ef 100644
>> --- a/fs/ext3/super.c
>> +++ b/fs/ext3/super.c
>> @@ -662,6 +662,9 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
>> if (test_opt(sb, DATA_ERR_ABORT))
>> seq_puts(seq, ",data_err=abort");
>>
>> + if (test_opt(sb, DISCARD))
>> + seq_puts(seq, ",discard");
>> +
>> if (test_opt(sb, NOLOAD))
>> seq_puts(seq, ",norecovery");
>>
>> @@ -811,7 +814,8 @@ enum {
>> Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
>> Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
>> Opt_noquota, Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
>> - Opt_usrquota, Opt_grpquota
>> + Opt_usrquota, Opt_grpquota,
>> + Opt_discard, Opt_nodiscard,
>> };
>>
>> static const match_table_t tokens = {
>> @@ -866,6 +870,8 @@ static const match_table_t tokens = {
>> {Opt_usrquota, "usrquota"},
>> {Opt_barrier, "barrier=%u"},
>> {Opt_resize, "resize"},
>> + {Opt_discard, "discard"},
>> + {Opt_nodiscard, "nodiscard"},
>> {Opt_err, NULL},
>> };
>>
>> @@ -1242,6 +1248,12 @@ set_qf_format:
>> case Opt_bh:
>> clear_opt(sbi->s_mount_opt, NOBH);
>> break;
>> + case Opt_discard:
>> + set_opt(sbi->s_mount_opt, DISCARD);
>> + break;
>> + case Opt_nodiscard:
>> + clear_opt(sbi->s_mount_opt, DISCARD);
>> + break;
>> default:
>> ext3_msg(sb, KERN_ERR,
>> "error: unrecognized mount option \"%s\" "
>> diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
>> index 5f494b4..f3fdd94 100644
>> --- a/include/linux/ext3_fs.h
>> +++ b/include/linux/ext3_fs.h
>> @@ -406,6 +406,7 @@ struct ext3_inode {
>> #define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
>> #define EXT3_MOUNT_DATA_ERR_ABORT 0x400000 /* Abort on file data write
>> * error in ordered mode */
>> +#define EXT3_MOUNT_DISCARD 0x800000 /* Issue DISCARD requests */
>>
>> /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
>> #ifndef _LINUX_EXT2_FS_H
>> --
>> 1.6.6.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-07-12 15:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 13:18 Ext3: batched discard support Lukas Czerner
2010-07-07 13:18 ` [PATCH 1/2] Add discard/nodiscard mount option for ext3 Lukas Czerner
2010-07-12 15:19 ` Jan Kara
2010-07-12 15:26 ` Lukas Czerner
2010-07-12 15:50 ` Jan Kara
2010-07-12 16:01 ` Lukas Czerner
2010-07-12 15:27 ` Ric Wheeler [this message]
2010-07-12 16:03 ` Ric Wheeler
2010-07-12 16:05 ` Lukas Czerner
2010-07-12 16:15 ` Lukas Czerner
2010-07-12 18:07 ` Eric Sandeen
2010-07-07 13:18 ` [PATCH 2/2] Add batched discard support " Lukas Czerner
2010-07-12 15:28 ` Jan Kara
2010-07-12 15:58 ` Lukas Czerner
2010-07-12 19:57 ` Jan Kara
2010-07-13 15:55 ` Lukas Czerner
2010-07-07 19:14 ` Ext3: batched discard support Greg Freemyer
2010-07-09 8:53 ` Lukas Czerner
2010-07-09 10:18 ` Ric Wheeler
2010-07-12 15:09 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C3B3464.9080505@redhat.com \
--to=rwheeler@redhat.com \
--cc=eshishki@redhat.com \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).