[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161110214639.GB27200@linux.intel.com>
Date: Thu, 10 Nov 2016 14:46:39 -0700
From: Ross Zwisler <ross.zwisler@...ux.intel.com>
To: Jan Kara <jack@...e.cz>
Cc: Ted Tso <tytso@....edu>, linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Ross Zwisler <ross.zwisler@...ux.intel.com>
Subject: Re: [PATCH 02/11] ext4: Let S_DAX set only if DAX is really supported
On Tue, Nov 08, 2016 at 12:08:08PM +0100, Jan Kara wrote:
> Currently we have S_DAX set inode->i_flags for a regular file whenever
> ext4 is mounted with dax mount option. However in some cases we cannot
> really do DAX - e.g. when inode is marked to use data journalling, when
> inode data is being encrypted, or when inode is stored inline. Make sure
> S_DAX flag is appropriately set/cleared in these cases.
>
> Signed-off-by: Jan Kara <jack@...e.cz>
> ---
<>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 20da99da0a34..b3108e6fa5f3 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1126,6 +1126,10 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len,
> ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT);
> ext4_clear_inode_state(inode,
> EXT4_STATE_MAY_INLINE_DATA);
> + /*
> + * Update inode->i_flags - e.g. S_DAX may get disabled
> + */
> + ext4_set_inode_flags(inode);
> }
> return res;
> }
> @@ -1140,6 +1144,7 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len,
> len, 0);
> if (!res) {
> ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT);
> + /* Update inode->i_flags - e.g. S_DAX may get disabled */
Missing call to ext4_set_inode_flags(inode)?
> res = ext4_mark_inode_dirty(handle, inode);
> if (res)
> EXT4_ERROR_INODE(inode, "Failed to mark inode dirty");
> --
> 2.6.6
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists