All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Nitesh Shetty <nj.shetty@samsung.com>
Cc: djwong@kernel.org, linux-nvme@lists.infradead.org, clm@fb.com,
	dm-devel@redhat.com, osandov@fb.com,
	"Alasdair Kergon" <agk@redhat.com>,
	msnitzer@redhat.com, bvanassche@acm.org,
	linux-scsi@vger.kernel.org, gost.dev@samsung.com,
	nitheshshetty@gmail.com, hch@lst.de,
	"Nitesh Shetty" <nj.shetty@samsung.com>,
	chaitanyak@nvidia.com, "Mike Snitzer" <snitzer@kernel.org>,
	josef@toxicpanda.com, linux-block@vger.kernel.org,
	dsterba@suse.com, kbusch@kernel.org, tytso@mit.edu,
	Frederick.Knight@netapp.com, axboe@kernel.dk,
	kbuild-all@lists.01.org, "Kanchan Joshi" <joshi.k@samsung.com>,
	martin.petersen@oracle.com, "Arnav Dawn" <arnav.dawn@samsung.com>,
	jack@suse.com, linux-fsdevel@vger.kernel.org,
	"Javier González" <javier.gonz@samsung.com>,
	lsf-pc@lists.linux-foundation.org
Subject: Re: [dm-devel] [PATCH v4 05/10] nvme: add copy offload support
Date: Thu, 28 Apr 2022 22:02:28 +0800	[thread overview]
Message-ID: <202204282136.kqIaq8aK-lkp@intel.com> (raw)
In-Reply-To: <20220426101241.30100-6-nj.shetty@samsung.com>

Hi Nitesh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20220422]
[cannot apply to axboe-block/for-next device-mapper-dm/for-next linus/master v5.18-rc4 v5.18-rc3 v5.18-rc2 v5.18-rc4]
[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/intel-lab-lkp/linux/commits/Nitesh-Shetty/block-Introduce-queue-limits-for-copy-offload-support/20220426-201825
base:    e7d6987e09a328d4a949701db40ef63fbb970670
config: s390-randconfig-s032-20220427 (https://download.01.org/0day-ci/archive/20220428/202204282136.kqIaq8aK-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/intel-lab-lkp/linux/commit/e029014185aff1d7c8facf6e19447487c6ce2b93
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Nitesh-Shetty/block-Introduce-queue-limits-for-copy-offload-support/20220426-201825
        git checkout e029014185aff1d7c8facf6e19447487c6ce2b93
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash drivers/md/ drivers/nvme/host/ drivers/nvme/target/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/host/core.c:803:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] dspec @@     got restricted __le32 [usertype] @@
   drivers/nvme/host/core.c:803:26: sparse:     expected restricted __le16 [usertype] dspec
   drivers/nvme/host/core.c:803:26: sparse:     got restricted __le32 [usertype]

vim +803 drivers/nvme/host/core.c

   739	
   740	static inline blk_status_t nvme_setup_copy_write(struct nvme_ns *ns,
   741		       struct request *req, struct nvme_command *cmnd)
   742	{
   743		struct nvme_ctrl *ctrl = ns->ctrl;
   744		struct nvme_copy_range *range = NULL;
   745		struct bio *bio = req->bio;
   746		struct nvme_copy_token *token = bvec_kmap_local(&bio->bi_io_vec[0]);
   747		sector_t src_sector, dst_sector, n_sectors;
   748		u64 src_lba, dst_lba, n_lba;
   749		unsigned short nr_range = 1;
   750		u16 control = 0;
   751		u32 dsmgmt = 0;
   752	
   753		if (unlikely(memcmp(token->subsys, "nvme", 4)))
   754			return BLK_STS_NOTSUPP;
   755		if (unlikely(token->ns != ns))
   756			return BLK_STS_NOTSUPP;
   757	
   758		src_sector = token->src_sector;
   759		dst_sector = bio->bi_iter.bi_sector;
   760		n_sectors = token->sectors;
   761		if (WARN_ON(n_sectors != bio->bi_iter.bi_size >> 9))
   762			return BLK_STS_NOTSUPP;
   763	
   764		src_lba = nvme_sect_to_lba(ns, src_sector);
   765		dst_lba = nvme_sect_to_lba(ns, dst_sector);
   766		n_lba = nvme_sect_to_lba(ns, n_sectors);
   767	
   768		if (unlikely(nvme_lba_to_sect(ns, src_lba) != src_sector) ||
   769				unlikely(nvme_lba_to_sect(ns, dst_lba) != dst_sector) ||
   770				unlikely(nvme_lba_to_sect(ns, n_lba) != n_sectors))
   771			return BLK_STS_NOTSUPP;
   772	
   773		if (WARN_ON(!n_lba))
   774			return BLK_STS_NOTSUPP;
   775	
   776		if (req->cmd_flags & REQ_FUA)
   777			control |= NVME_RW_FUA;
   778	
   779		if (req->cmd_flags & REQ_FAILFAST_DEV)
   780			control |= NVME_RW_LR;
   781	
   782		memset(cmnd, 0, sizeof(*cmnd));
   783		cmnd->copy.opcode = nvme_cmd_copy;
   784		cmnd->copy.nsid = cpu_to_le32(ns->head->ns_id);
   785		cmnd->copy.sdlba = cpu_to_le64(dst_lba);
   786	
   787		range = kmalloc_array(nr_range, sizeof(*range),
   788				GFP_ATOMIC | __GFP_NOWARN);
   789		if (!range)
   790			return BLK_STS_RESOURCE;
   791	
   792		range[0].slba = cpu_to_le64(src_lba);
   793		range[0].nlb = cpu_to_le16(n_lba - 1);
   794	
   795		cmnd->copy.nr_range = 0;
   796	
   797		req->special_vec.bv_page = virt_to_page(range);
   798		req->special_vec.bv_offset = offset_in_page(range);
   799		req->special_vec.bv_len = sizeof(*range) * nr_range;
   800		req->rq_flags |= RQF_SPECIAL_PAYLOAD;
   801	
   802		cmnd->copy.control = cpu_to_le16(control);
 > 803		cmnd->copy.dspec = cpu_to_le32(dsmgmt);
   804	
   805		return BLK_STS_OK;
   806	}
   807	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Nitesh Shetty <nj.shetty@samsung.com>
Cc: kbuild-all@lists.01.org, chaitanyak@nvidia.com,
	linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	dm-devel@redhat.com, linux-nvme@lists.infradead.org,
	linux-fsdevel@vger.kernel.org, axboe@kernel.dk,
	msnitzer@redhat.com, bvanassche@acm.org,
	martin.petersen@oracle.com, hare@suse.de, kbusch@kernel.org,
	hch@lst.de, Frederick.Knight@netapp.com, osandov@fb.com,
	lsf-pc@lists.linux-foundation.org, djwong@kernel.org,
	josef@toxicpanda.com, clm@fb.com, dsterba@suse.com,
	tytso@mit.edu, jack@suse.com, nitheshshetty@gmail.com,
	gost.dev@samsung.com, "Nitesh Shetty" <nj.shetty@samsung.com>,
	"Kanchan Joshi" <joshi.k@samsung.com>,
	"Javier González" <javier.gonz@samsung.com>,
	"Arnav Dawn" <arnav.dawn@samsung.com>,
	"Alasdair Kergon" <agk@redhat.com>,
	"Mike Snitzer" <snitzer@kernel.org>
Subject: Re: [PATCH v4 05/10] nvme: add copy offload support
Date: Thu, 28 Apr 2022 22:02:28 +0800	[thread overview]
Message-ID: <202204282136.kqIaq8aK-lkp@intel.com> (raw)
In-Reply-To: <20220426101241.30100-6-nj.shetty@samsung.com>

Hi Nitesh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20220422]
[cannot apply to axboe-block/for-next device-mapper-dm/for-next linus/master v5.18-rc4 v5.18-rc3 v5.18-rc2 v5.18-rc4]
[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/intel-lab-lkp/linux/commits/Nitesh-Shetty/block-Introduce-queue-limits-for-copy-offload-support/20220426-201825
base:    e7d6987e09a328d4a949701db40ef63fbb970670
config: s390-randconfig-s032-20220427 (https://download.01.org/0day-ci/archive/20220428/202204282136.kqIaq8aK-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/intel-lab-lkp/linux/commit/e029014185aff1d7c8facf6e19447487c6ce2b93
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Nitesh-Shetty/block-Introduce-queue-limits-for-copy-offload-support/20220426-201825
        git checkout e029014185aff1d7c8facf6e19447487c6ce2b93
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash drivers/md/ drivers/nvme/host/ drivers/nvme/target/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/host/core.c:803:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] dspec @@     got restricted __le32 [usertype] @@
   drivers/nvme/host/core.c:803:26: sparse:     expected restricted __le16 [usertype] dspec
   drivers/nvme/host/core.c:803:26: sparse:     got restricted __le32 [usertype]

vim +803 drivers/nvme/host/core.c

   739	
   740	static inline blk_status_t nvme_setup_copy_write(struct nvme_ns *ns,
   741		       struct request *req, struct nvme_command *cmnd)
   742	{
   743		struct nvme_ctrl *ctrl = ns->ctrl;
   744		struct nvme_copy_range *range = NULL;
   745		struct bio *bio = req->bio;
   746		struct nvme_copy_token *token = bvec_kmap_local(&bio->bi_io_vec[0]);
   747		sector_t src_sector, dst_sector, n_sectors;
   748		u64 src_lba, dst_lba, n_lba;
   749		unsigned short nr_range = 1;
   750		u16 control = 0;
   751		u32 dsmgmt = 0;
   752	
   753		if (unlikely(memcmp(token->subsys, "nvme", 4)))
   754			return BLK_STS_NOTSUPP;
   755		if (unlikely(token->ns != ns))
   756			return BLK_STS_NOTSUPP;
   757	
   758		src_sector = token->src_sector;
   759		dst_sector = bio->bi_iter.bi_sector;
   760		n_sectors = token->sectors;
   761		if (WARN_ON(n_sectors != bio->bi_iter.bi_size >> 9))
   762			return BLK_STS_NOTSUPP;
   763	
   764		src_lba = nvme_sect_to_lba(ns, src_sector);
   765		dst_lba = nvme_sect_to_lba(ns, dst_sector);
   766		n_lba = nvme_sect_to_lba(ns, n_sectors);
   767	
   768		if (unlikely(nvme_lba_to_sect(ns, src_lba) != src_sector) ||
   769				unlikely(nvme_lba_to_sect(ns, dst_lba) != dst_sector) ||
   770				unlikely(nvme_lba_to_sect(ns, n_lba) != n_sectors))
   771			return BLK_STS_NOTSUPP;
   772	
   773		if (WARN_ON(!n_lba))
   774			return BLK_STS_NOTSUPP;
   775	
   776		if (req->cmd_flags & REQ_FUA)
   777			control |= NVME_RW_FUA;
   778	
   779		if (req->cmd_flags & REQ_FAILFAST_DEV)
   780			control |= NVME_RW_LR;
   781	
   782		memset(cmnd, 0, sizeof(*cmnd));
   783		cmnd->copy.opcode = nvme_cmd_copy;
   784		cmnd->copy.nsid = cpu_to_le32(ns->head->ns_id);
   785		cmnd->copy.sdlba = cpu_to_le64(dst_lba);
   786	
   787		range = kmalloc_array(nr_range, sizeof(*range),
   788				GFP_ATOMIC | __GFP_NOWARN);
   789		if (!range)
   790			return BLK_STS_RESOURCE;
   791	
   792		range[0].slba = cpu_to_le64(src_lba);
   793		range[0].nlb = cpu_to_le16(n_lba - 1);
   794	
   795		cmnd->copy.nr_range = 0;
   796	
   797		req->special_vec.bv_page = virt_to_page(range);
   798		req->special_vec.bv_offset = offset_in_page(range);
   799		req->special_vec.bv_len = sizeof(*range) * nr_range;
   800		req->rq_flags |= RQF_SPECIAL_PAYLOAD;
   801	
   802		cmnd->copy.control = cpu_to_le16(control);
 > 803		cmnd->copy.dspec = cpu_to_le32(dsmgmt);
   804	
   805		return BLK_STS_OK;
   806	}
   807	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-04-28 14:03 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220426101804epcas5p4a0a325d3ce89e868e4924bbdeeba6d15@epcas5p4.samsung.com>
2022-04-26 10:12 ` [dm-devel] [PATCH v4 00/10] Add Copy offload support Nitesh Shetty
2022-04-26 10:12   ` Nitesh Shetty
2022-04-26 10:12   ` Nitesh Shetty
2022-04-26 10:12   ` [dm-devel] [PATCH v4 01/10] block: Introduce queue limits for copy-offload support Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-27  1:59     ` [dm-devel] " Damien Le Moal
2022-04-27  1:59       ` Damien Le Moal
2022-04-27 15:30       ` [dm-devel] " Nitesh Shetty
2022-04-27 15:30         ` Nitesh Shetty
2022-04-27 21:57         ` [dm-devel] " Damien Le Moal
2022-04-27 21:57           ` Damien Le Moal
2022-04-27 10:30     ` [dm-devel] " Hannes Reinecke
2022-04-27 10:30       ` Hannes Reinecke
2022-04-26 10:12   ` [dm-devel] [PATCH v4 02/10] block: Add copy offload support infrastructure Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-27  0:11     ` [dm-devel] " kernel test robot
2022-04-27  0:11       ` kernel test robot
2022-04-27  2:45     ` [dm-devel] " Damien Le Moal
2022-04-27  2:45       ` Damien Le Moal
2022-04-27 15:15       ` [dm-devel] " Nitesh Shetty
2022-04-27 15:15         ` Nitesh Shetty
2022-04-27 22:04         ` [dm-devel] " Damien Le Moal
2022-04-27 22:04           ` Damien Le Moal
2022-04-28  8:01           ` [dm-devel] " Nitesh Shetty
2022-04-28  8:01             ` Nitesh Shetty
2022-04-27 10:29     ` [dm-devel] " Hannes Reinecke
2022-04-27 10:29       ` Hannes Reinecke
2022-04-27 15:48       ` [dm-devel] " Nitesh Shetty
2022-04-27 15:48         ` Nitesh Shetty
2022-04-26 10:12   ` [dm-devel] [PATCH v4 03/10] block: Introduce a new ioctl for copy Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-27  2:48     ` [dm-devel] " Damien Le Moal
2022-04-27  2:48       ` Damien Le Moal
2022-04-27 13:03       ` [dm-devel] " Nitesh Shetty
2022-04-27 13:03         ` Nitesh Shetty
2022-04-27 10:37     ` [dm-devel] " Hannes Reinecke
2022-04-27 10:37       ` Hannes Reinecke
2022-04-26 10:12   ` [dm-devel] [PATCH v4 04/10] block: add emulation " Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-27  1:33     ` [dm-devel] " kernel test robot
2022-04-27  1:33       ` kernel test robot
2022-04-26 10:12   ` [dm-devel] [PATCH v4 05/10] nvme: add copy offload support Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-28 14:02     ` kernel test robot [this message]
2022-04-28 14:02       ` kernel test robot
2022-04-26 10:12   ` [dm-devel] [PATCH v4 06/10] nvmet: add copy command support for bdev and file ns Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-28 14:53     ` [dm-devel] " kernel test robot
2022-04-28 14:53       ` kernel test robot
2022-04-26 10:12   ` [dm-devel] [PATCH v4 07/10] dm: Add support for copy offload Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-28 15:54     ` [dm-devel] " kernel test robot
2022-04-28 15:54       ` kernel test robot
2022-04-26 10:12   ` [dm-devel] [PATCH v4 08/10] dm: Enable copy offload for dm-linear target Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12   ` [dm-devel] [PATCH v4 09/10] dm kcopyd: use copy offload support Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12   ` [dm-devel] [PATCH v4 10/10] fs: add support for copy file range in zonefs Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-26 10:12     ` Nitesh Shetty
2022-04-27  1:42     ` [dm-devel] " Damien Le Moal
2022-04-27  1:42       ` Damien Le Moal
2022-04-27  1:46   ` [dm-devel] [PATCH v4 00/10] Add Copy offload support Damien Le Moal
2022-04-27  1:46     ` Damien Le Moal
2022-04-27 15:38     ` [dm-devel] " Nitesh Shetty
2022-04-27 15:38       ` Nitesh Shetty
2022-04-27 21:56       ` [dm-devel] " Damien Le Moal
2022-04-27 21:56         ` Damien Le Moal
2022-04-27  2:00   ` [dm-devel] " Damien Le Moal
2022-04-27  2:00     ` Damien Le Moal
2022-04-27  2:19   ` [dm-devel] " Damien Le Moal
2022-04-27  2:19     ` Damien Le Moal
2022-04-27 12:49     ` [dm-devel] " Nitesh Shetty
2022-04-27 12:49       ` Nitesh Shetty
2022-04-27 22:05       ` [dm-devel] " Damien Le Moal
2022-04-27 22:05         ` Damien Le Moal
2022-04-28  7:49         ` [dm-devel] " Nitesh Shetty
2022-04-28  7:49           ` Nitesh Shetty
2022-04-28 21:37           ` [dm-devel] " Damien Le Moal
2022-04-28 21:37             ` Damien Le Moal
2022-04-29  3:39             ` [dm-devel] " Bart Van Assche
2022-04-29  3:39               ` Bart Van Assche
2022-05-02  4:09       ` Dave Chinner
2022-05-02  4:09         ` Dave Chinner
2022-05-02 12:54         ` [dm-devel] " Damien Le Moal
2022-05-02 12:54           ` Damien Le Moal
2022-05-02 23:20           ` [dm-devel] " Dave Chinner
2022-05-02 23:20             ` Dave Chinner
2022-05-02 12:14       ` [dm-devel] " Damien Le Moal
2022-05-02 12:14         ` Damien Le Moal
2022-05-02 12:16         ` Damien Le Moal
2022-05-02 12:16           ` Damien Le Moal

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=202204282136.kqIaq8aK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frederick.Knight@netapp.com \
    --cc=agk@redhat.com \
    --cc=arnav.dawn@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=chaitanyak@nvidia.com \
    --cc=clm@fb.com \
    --cc=djwong@kernel.org \
    --cc=dm-devel@redhat.com \
    --cc=dsterba@suse.com \
    --cc=gost.dev@samsung.com \
    --cc=hch@lst.de \
    --cc=jack@suse.com \
    --cc=javier.gonz@samsung.com \
    --cc=josef@toxicpanda.com \
    --cc=joshi.k@samsung.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=martin.petersen@oracle.com \
    --cc=msnitzer@redhat.com \
    --cc=nitheshshetty@gmail.com \
    --cc=nj.shetty@samsung.com \
    --cc=osandov@fb.com \
    --cc=snitzer@kernel.org \
    --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.