From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ritesh Harjani <riteshh@linux.ibm.com>, linux-ext4@vger.kernel.org
Cc: lkp@intel.com, kbuild-all@lists.01.org, jack@suse.cz,
tytso@mit.edu, Dan Williams <dan.j.williams@intel.com>,
Anju T Sudhakar <anju@linux.vnet.ibm.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Ritesh Harjani <riteshh@linux.ibm.com>
Subject: Re: [PATCHv2 1/3] ext4: Refactor ext4_overwrite_io() to take ext4_map_blocks as argument
Date: Mon, 24 Aug 2020 15:15:30 +0300 [thread overview]
Message-ID: <20200824121530.GN1793@kadam> (raw)
In-Reply-To: <057a08972f818c035621a9fd3ff870bedcdf5e83.1598094830.git.riteshh@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3176 bytes --]
Hi Ritesh,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.9-rc1]
[cannot apply to ext4/dev next-20200821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ritesh-Harjani/Optimize-ext4-DAX-overwrites/20200822-193615
base: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: i386-randconfig-m021-20200822 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/ext4/file.c:194 ext4_overwrite_io() warn: should '(map->m_lblk + map->m_len) << blkbits' be a 64 bit type?
Old smatch warnings:
include/linux/fs.h:867 i_size_write() warn: statement has no effect 31
fs/ext4/file.c:585 ext4_dio_write_iter() warn: inconsistent returns 'inode->i_rwsem'.
# https://github.com/0day-ci/linux/commit/5d171d1d87ee0aca0a992b6843d154b41466e5e5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ritesh-Harjani/Optimize-ext4-DAX-overwrites/20200822-193615
git checkout 5d171d1d87ee0aca0a992b6843d154b41466e5e5
vim +194 fs/ext4/file.c
e9e3bcecf44c04 Eric Sandeen 2011-02-12 189
213bcd9ccbf04b Jan Kara 2016-11-20 190 /* Is IO overwriting allocated and initialized blocks? */
5d171d1d87ee0a Ritesh Harjani 2020-08-22 191 static bool ext4_overwrite_io(struct inode *inode, struct ext4_map_blocks *map)
213bcd9ccbf04b Jan Kara 2016-11-20 192 {
213bcd9ccbf04b Jan Kara 2016-11-20 193 unsigned int blkbits = inode->i_blkbits;
5d171d1d87ee0a Ritesh Harjani 2020-08-22 @194 loff_t end = (map->m_lblk + map->m_len) << blkbits;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
potential shift wrap?
5d171d1d87ee0a Ritesh Harjani 2020-08-22 195 int err, blklen = map->m_len;
213bcd9ccbf04b Jan Kara 2016-11-20 196
5d171d1d87ee0a Ritesh Harjani 2020-08-22 197 if (end > i_size_read(inode))
213bcd9ccbf04b Jan Kara 2016-11-20 198 return false;
213bcd9ccbf04b Jan Kara 2016-11-20 199
5d171d1d87ee0a Ritesh Harjani 2020-08-22 200 err = ext4_map_blocks(NULL, inode, map, 0);
213bcd9ccbf04b Jan Kara 2016-11-20 201 /*
213bcd9ccbf04b Jan Kara 2016-11-20 202 * 'err==len' means that all of the blocks have been preallocated,
213bcd9ccbf04b Jan Kara 2016-11-20 203 * regardless of whether they have been initialized or not. To exclude
213bcd9ccbf04b Jan Kara 2016-11-20 204 * unwritten extents, we need to check m_flags.
213bcd9ccbf04b Jan Kara 2016-11-20 205 */
5d171d1d87ee0a Ritesh Harjani 2020-08-22 206 return err == blklen && (map->m_flags & EXT4_MAP_MAPPED);
213bcd9ccbf04b Jan Kara 2016-11-20 207 }
213bcd9ccbf04b Jan Kara 2016-11-20 208
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35937 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCHv2 1/3] ext4: Refactor ext4_overwrite_io() to take ext4_map_blocks as argument
Date: Mon, 24 Aug 2020 15:15:30 +0300 [thread overview]
Message-ID: <20200824121530.GN1793@kadam> (raw)
In-Reply-To: <057a08972f818c035621a9fd3ff870bedcdf5e83.1598094830.git.riteshh@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3237 bytes --]
Hi Ritesh,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.9-rc1]
[cannot apply to ext4/dev next-20200821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ritesh-Harjani/Optimize-ext4-DAX-overwrites/20200822-193615
base: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: i386-randconfig-m021-20200822 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/ext4/file.c:194 ext4_overwrite_io() warn: should '(map->m_lblk + map->m_len) << blkbits' be a 64 bit type?
Old smatch warnings:
include/linux/fs.h:867 i_size_write() warn: statement has no effect 31
fs/ext4/file.c:585 ext4_dio_write_iter() warn: inconsistent returns 'inode->i_rwsem'.
# https://github.com/0day-ci/linux/commit/5d171d1d87ee0aca0a992b6843d154b41466e5e5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ritesh-Harjani/Optimize-ext4-DAX-overwrites/20200822-193615
git checkout 5d171d1d87ee0aca0a992b6843d154b41466e5e5
vim +194 fs/ext4/file.c
e9e3bcecf44c04 Eric Sandeen 2011-02-12 189
213bcd9ccbf04b Jan Kara 2016-11-20 190 /* Is IO overwriting allocated and initialized blocks? */
5d171d1d87ee0a Ritesh Harjani 2020-08-22 191 static bool ext4_overwrite_io(struct inode *inode, struct ext4_map_blocks *map)
213bcd9ccbf04b Jan Kara 2016-11-20 192 {
213bcd9ccbf04b Jan Kara 2016-11-20 193 unsigned int blkbits = inode->i_blkbits;
5d171d1d87ee0a Ritesh Harjani 2020-08-22 @194 loff_t end = (map->m_lblk + map->m_len) << blkbits;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
potential shift wrap?
5d171d1d87ee0a Ritesh Harjani 2020-08-22 195 int err, blklen = map->m_len;
213bcd9ccbf04b Jan Kara 2016-11-20 196
5d171d1d87ee0a Ritesh Harjani 2020-08-22 197 if (end > i_size_read(inode))
213bcd9ccbf04b Jan Kara 2016-11-20 198 return false;
213bcd9ccbf04b Jan Kara 2016-11-20 199
5d171d1d87ee0a Ritesh Harjani 2020-08-22 200 err = ext4_map_blocks(NULL, inode, map, 0);
213bcd9ccbf04b Jan Kara 2016-11-20 201 /*
213bcd9ccbf04b Jan Kara 2016-11-20 202 * 'err==len' means that all of the blocks have been preallocated,
213bcd9ccbf04b Jan Kara 2016-11-20 203 * regardless of whether they have been initialized or not. To exclude
213bcd9ccbf04b Jan Kara 2016-11-20 204 * unwritten extents, we need to check m_flags.
213bcd9ccbf04b Jan Kara 2016-11-20 205 */
5d171d1d87ee0a Ritesh Harjani 2020-08-22 206 return err == blklen && (map->m_flags & EXT4_MAP_MAPPED);
213bcd9ccbf04b Jan Kara 2016-11-20 207 }
213bcd9ccbf04b Jan Kara 2016-11-20 208
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35937 bytes --]
next prev parent reply other threads:[~2020-08-24 12:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-22 11:34 [PATCHv2 0/3] Optimize ext4 DAX overwrites Ritesh Harjani
2020-08-22 11:34 ` [PATCHv2 1/3] ext4: Refactor ext4_overwrite_io() to take ext4_map_blocks as argument Ritesh Harjani
2020-08-24 12:15 ` Dan Carpenter [this message]
2020-08-24 12:15 ` Dan Carpenter
2020-10-03 3:59 ` Theodore Y. Ts'o
2020-08-22 11:34 ` [PATCHv2 2/3] ext4: Extend ext4_overwrite_io() for dax path Ritesh Harjani
2020-08-22 11:34 ` [PATCHv2 3/3] ext4: Optimize ext4 DAX overwrites Ritesh Harjani
-- strict thread matches above, loose matches on Subject: below --
2020-08-22 17:52 [PATCHv2 1/3] ext4: Refactor ext4_overwrite_io() to take ext4_map_blocks as argument kernel test robot
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=20200824121530.GN1793@kadam \
--to=dan.carpenter@oracle.com \
--cc=anju@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=jack@suse.cz \
--cc=kbuild-all@lists.01.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=riteshh@linux.ibm.com \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.