From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 11/11] scsi: sd_zbc: emulate ZONE_APPEND commands
Date: Wed, 11 Mar 2020 08:57:04 +0800 [thread overview]
Message-ID: <202003110817.Cbs1W0r3%lkp@intel.com> (raw)
In-Reply-To: <20200310094653.33257-12-johannes.thumshirn@wdc.com>
[-- Attachment #1: Type: text/plain, Size: 6639 bytes --]
Hi Johannes,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on scsi/for-next mkp-scsi/for-next linus/master v5.6-rc5 next-20200310]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Johannes-Thumshirn/Introduce-Zone-Append-for-writing-to-zoned-block-devices/20200310-213648
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: mips-fuloong2e_defconfig (attached as .config)
compiler: mips64el-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/scsi/sd.c:72:0:
drivers/scsi/sd.h:253:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
static inline insigned int sd_zbc_complete(struct scsi_cmnd *cmd,
^
drivers/scsi/sd.c: In function 'sd_setup_read_write_cmnd':
drivers/scsi/sd.c:1219:9: error: too many arguments to function 'sd_zbc_prepare_zone_append'
ret = sd_zbc_prepare_zone_append(cmd, &lba, nr_blocks);
^
In file included from drivers/scsi/sd.c:72:0:
drivers/scsi/sd.h:259:28: note: declared here
static inline blk_status_t sd_zbc_prepare_zone_append(struct scsi_cmnd *cmd,
^
drivers/scsi/sd.c: In function 'sd_done':
>> drivers/scsi/sd.c:2065:16: error: implicit declaration of function 'sd_zbc_complete' [-Werror=implicit-function-declaration]
good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr);
^
cc1: some warnings being treated as errors
vim +/sd_zbc_complete +2065 drivers/scsi/sd.c
1949
1950 /**
1951 * sd_done - bottom half handler: called when the lower level
1952 * driver has completed (successfully or otherwise) a scsi command.
1953 * @SCpnt: mid-level's per command structure.
1954 *
1955 * Note: potentially run from within an ISR. Must not block.
1956 **/
1957 static int sd_done(struct scsi_cmnd *SCpnt)
1958 {
1959 int result = SCpnt->result;
1960 unsigned int good_bytes = result ? 0 : scsi_bufflen(SCpnt);
1961 unsigned int sector_size = SCpnt->device->sector_size;
1962 unsigned int resid;
1963 struct scsi_sense_hdr sshdr;
1964 struct scsi_disk *sdkp = scsi_disk(SCpnt->request->rq_disk);
1965 struct request *req = SCpnt->request;
1966 int sense_valid = 0;
1967 int sense_deferred = 0;
1968
1969 switch (req_op(req)) {
1970 case REQ_OP_DISCARD:
1971 case REQ_OP_WRITE_ZEROES:
1972 case REQ_OP_WRITE_SAME:
1973 case REQ_OP_ZONE_RESET:
1974 case REQ_OP_ZONE_RESET_ALL:
1975 case REQ_OP_ZONE_OPEN:
1976 case REQ_OP_ZONE_CLOSE:
1977 case REQ_OP_ZONE_FINISH:
1978 if (!result) {
1979 good_bytes = blk_rq_bytes(req);
1980 scsi_set_resid(SCpnt, 0);
1981 } else {
1982 good_bytes = 0;
1983 scsi_set_resid(SCpnt, blk_rq_bytes(req));
1984 }
1985 break;
1986 default:
1987 /*
1988 * In case of bogus fw or device, we could end up having
1989 * an unaligned partial completion. Check this here and force
1990 * alignment.
1991 */
1992 resid = scsi_get_resid(SCpnt);
1993 if (resid & (sector_size - 1)) {
1994 sd_printk(KERN_INFO, sdkp,
1995 "Unaligned partial completion (resid=%u, sector_sz=%u)\n",
1996 resid, sector_size);
1997 scsi_print_command(SCpnt);
1998 resid = min(scsi_bufflen(SCpnt),
1999 round_up(resid, sector_size));
2000 scsi_set_resid(SCpnt, resid);
2001 }
2002 }
2003
2004 if (result) {
2005 sense_valid = scsi_command_normalize_sense(SCpnt, &sshdr);
2006 if (sense_valid)
2007 sense_deferred = scsi_sense_is_deferred(&sshdr);
2008 }
2009 sdkp->medium_access_timed_out = 0;
2010
2011 if (driver_byte(result) != DRIVER_SENSE &&
2012 (!sense_valid || sense_deferred))
2013 goto out;
2014
2015 switch (sshdr.sense_key) {
2016 case HARDWARE_ERROR:
2017 case MEDIUM_ERROR:
2018 good_bytes = sd_completed_bytes(SCpnt);
2019 break;
2020 case RECOVERED_ERROR:
2021 good_bytes = scsi_bufflen(SCpnt);
2022 break;
2023 case NO_SENSE:
2024 /* This indicates a false check condition, so ignore it. An
2025 * unknown amount of data was transferred so treat it as an
2026 * error.
2027 */
2028 SCpnt->result = 0;
2029 memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
2030 break;
2031 case ABORTED_COMMAND:
2032 if (sshdr.asc == 0x10) /* DIF: Target detected corruption */
2033 good_bytes = sd_completed_bytes(SCpnt);
2034 break;
2035 case ILLEGAL_REQUEST:
2036 switch (sshdr.asc) {
2037 case 0x10: /* DIX: Host detected corruption */
2038 good_bytes = sd_completed_bytes(SCpnt);
2039 break;
2040 case 0x20: /* INVALID COMMAND OPCODE */
2041 case 0x24: /* INVALID FIELD IN CDB */
2042 switch (SCpnt->cmnd[0]) {
2043 case UNMAP:
2044 sd_config_discard(sdkp, SD_LBP_DISABLE);
2045 break;
2046 case WRITE_SAME_16:
2047 case WRITE_SAME:
2048 if (SCpnt->cmnd[1] & 8) { /* UNMAP */
2049 sd_config_discard(sdkp, SD_LBP_DISABLE);
2050 } else {
2051 sdkp->device->no_write_same = 1;
2052 sd_config_write_same(sdkp);
2053 req->rq_flags |= RQF_QUIET;
2054 }
2055 break;
2056 }
2057 }
2058 break;
2059 default:
2060 break;
2061 }
2062
2063 out:
2064 if (sd_is_zoned(sdkp))
> 2065 good_bytes = sd_zbc_complete(SCpnt, good_bytes, &sshdr);
2066
2067 SCSI_LOG_HLCOMPLETE(1, scmd_printk(KERN_INFO, SCpnt,
2068 "sd_done: completed %d of %d bytes\n",
2069 good_bytes, scsi_bufflen(SCpnt)));
2070
2071 return good_bytes;
2072 }
2073
---
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: 19192 bytes --]
next prev parent reply other threads:[~2020-03-11 0:57 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 9:46 [PATCH 00/11] Introduce Zone Append for writing to zoned block devices Johannes Thumshirn
2020-03-10 9:46 ` [PATCH 01/11] block: provide fallbacks for blk_queue_zone_is_seq and blk_queue_zone_no Johannes Thumshirn
2020-03-10 9:46 ` [PATCH 02/11] block: Introduce REQ_OP_ZONE_APPEND Johannes Thumshirn
2020-03-10 9:46 ` [PATCH 03/11] block: introduce bio_add_append_page Johannes Thumshirn
2020-03-10 16:43 ` Christoph Hellwig
2020-03-11 18:11 ` Johannes Thumshirn
2020-03-10 9:46 ` [PATCH 04/11] null_blk: Support REQ_OP_ZONE_APPEND Johannes Thumshirn
2020-03-10 16:43 ` Christoph Hellwig
2020-03-10 9:46 ` [PATCH 05/11] block: introduce BLK_STS_ZONE_RESOURCE Johannes Thumshirn
2020-03-10 16:43 ` Christoph Hellwig
2020-03-10 9:46 ` [PATCH 06/11] block: introduce blk_req_zone_write_trylock Johannes Thumshirn
2020-03-10 9:46 ` [PATCH 07/11] block: factor out requeue handling from dispatch code Johannes Thumshirn
2020-03-10 16:44 ` Christoph Hellwig
2020-03-10 9:46 ` [PATCH 08/11] block: delay un-dispatchable request Johannes Thumshirn
2020-03-10 16:45 ` Christoph Hellwig
2020-03-10 9:46 ` [PATCH 09/11] block: Introduce zone write pointer offset caching Johannes Thumshirn
2020-03-10 16:46 ` Christoph Hellwig
2020-03-11 0:34 ` Damien Le Moal
2020-03-11 6:24 ` Christoph Hellwig
2020-03-11 6:40 ` Damien Le Moal
2020-03-10 9:46 ` [PATCH 10/11] scsi: sd_zbc: factor out sanity checks for zoned commands Johannes Thumshirn
2020-03-10 9:46 ` [PATCH 11/11] scsi: sd_zbc: emulate ZONE_APPEND commands Johannes Thumshirn
2020-03-10 17:43 ` kbuild test robot
2020-03-10 19:38 ` kbuild test robot
2020-03-10 22:43 ` kbuild test robot
2020-03-10 23:04 ` kbuild test robot
2020-03-11 0:57 ` kbuild test robot [this message]
2020-03-10 16:42 ` [PATCH 00/11] Introduce Zone Append for writing to zoned block devices Christoph Hellwig
2020-03-11 0:37 ` Damien Le Moal
2020-03-11 6:24 ` Christoph Hellwig
2020-03-11 6:40 ` Damien Le Moal
2020-03-11 7:22 ` Johannes Thumshirn
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=202003110817.Cbs1W0r3%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.