From: kernel test robot <lkp@intel.com>
To: Jan Kara <jack@suse.cz>, Jens Axboe <axboe@kernel.dk>
Cc: oe-kbuild-all@lists.linux.dev, linux-block@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Dmitry Vyukov <dvyukov@google.com>, Ted Tso <tytso@mit.edu>,
yebin <yebin@huaweicloud.com>,
linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] block: Add config option to not allow writing to mounted devices
Date: Tue, 13 Jun 2023 12:56:08 +0800 [thread overview]
Message-ID: <202306131212.dPssLmeY-lkp@intel.com> (raw)
In-Reply-To: <20230612161614.10302-1-jack@suse.cz>
Hi Jan,
kernel test robot noticed the following build errors:
[auto build test ERROR on v6.4-rc6]
[also build test ERROR on linus/master next-20230609]
[cannot apply to axboe-block/for-next]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jan-Kara/block-Add-config-option-to-not-allow-writing-to-mounted-devices/20230613-001910
base: v6.4-rc6
patch link: https://lore.kernel.org/r/20230612161614.10302-1-jack%40suse.cz
patch subject: [PATCH] block: Add config option to not allow writing to mounted devices
config: arc-randconfig-r043-20230612 (https://download.01.org/0day-ci/archive/20230613/202306131212.dPssLmeY-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout v6.4-rc6
b4 shazam https://lore.kernel.org/r/20230612161614.10302-1-jack@suse.cz
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306131212.dPssLmeY-lkp@intel.com/
All errors (new ones prefixed by >>):
block/bdev.c: In function 'blkdev_get_whole':
>> block/bdev.c:606:59: error: 'struct block_device' has no member named 'bd_writers'
606 | if (mode & FMODE_EXCL && atomic_read(&bdev->bd_writers) > 0)
| ^~
block/bdev.c:627:33: error: 'struct block_device' has no member named 'bd_writers'
627 | atomic_inc(&bdev->bd_writers);
| ^~
block/bdev.c: In function 'blkdev_put_whole':
block/bdev.c:637:33: error: 'struct block_device' has no member named 'bd_writers'
637 | atomic_dec(&bdev->bd_writers);
| ^~
vim +606 block/bdev.c
599
600 static int blkdev_get_whole(struct block_device *bdev, fmode_t mode)
601 {
602 struct gendisk *disk = bdev->bd_disk;
603 int ret;
604
605 if (IS_ENABLED(BLK_DEV_WRITE_HARDENING)) {
> 606 if (mode & FMODE_EXCL && atomic_read(&bdev->bd_writers) > 0)
607 return -EBUSY;
608 if (mode & FMODE_WRITE && bdev->bd_holders > 0)
609 return -EBUSY;
610 }
611 if (disk->fops->open) {
612 ret = disk->fops->open(bdev, mode);
613 if (ret) {
614 /* avoid ghost partitions on a removed medium */
615 if (ret == -ENOMEDIUM &&
616 test_bit(GD_NEED_PART_SCAN, &disk->state))
617 bdev_disk_changed(disk, true);
618 return ret;
619 }
620 }
621
622 if (!atomic_read(&bdev->bd_openers))
623 set_init_blocksize(bdev);
624 if (test_bit(GD_NEED_PART_SCAN, &disk->state))
625 bdev_disk_changed(disk, false);
626 if (IS_ENABLED(BLK_DEV_WRITE_HARDENING) && mode & FMODE_WRITE)
627 atomic_inc(&bdev->bd_writers);
628 atomic_inc(&bdev->bd_openers);
629 return 0;
630 }
631
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-13 4:56 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 16:16 [PATCH] block: Add config option to not allow writing to mounted devices Jan Kara
2023-06-12 16:25 ` Jan Kara
2023-06-12 17:39 ` Bart Van Assche
2023-06-12 17:47 ` Theodore Ts'o
2023-06-12 18:52 ` Colin Walters
2023-06-13 11:34 ` Jan Kara
2023-06-14 1:55 ` Darrick J. Wong
2023-06-14 7:14 ` Christoph Hellwig
2023-06-14 7:05 ` Christian Brauner
2023-06-14 7:07 ` Christoph Hellwig
2023-06-14 7:10 ` Christoph Hellwig
2023-06-14 10:12 ` Jan Kara
2023-06-14 14:30 ` Christoph Hellwig
2023-06-14 14:46 ` Matthew Wilcox
2023-06-13 4:56 ` kernel test robot [this message]
2023-06-13 5:10 ` Christoph Hellwig
2023-06-13 6:09 ` Dmitry Vyukov
2023-06-14 7:17 ` Christoph Hellwig
2023-06-14 8:18 ` Christian Brauner
2023-06-14 10:36 ` Jan Kara
2023-06-14 12:48 ` Christian Brauner
2023-06-15 14:39 ` Jan Kara
2023-06-14 14:31 ` Christoph Hellwig
2023-06-13 20:56 ` Jan Kara
2023-06-14 7:20 ` Christoph Hellwig
2023-06-20 10:41 ` Jan Kara
2023-06-20 11:29 ` Christoph Hellwig
2023-06-14 7:35 ` Christian Brauner
2023-06-13 6:49 ` Dmitry Vyukov
2023-06-13 19:22 ` Theodore Ts'o
2023-06-14 0:26 ` Dave Chinner
2023-06-14 2:04 ` Darrick J. Wong
2023-06-14 2:57 ` Theodore Ts'o
2023-06-14 12:27 ` Dmitry Vyukov
2023-06-14 23:38 ` Dave Chinner
2023-06-15 9:14 ` Dmitry Vyukov
2023-06-18 23:35 ` Dave Chinner
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=202306131212.dPssLmeY-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=dvyukov@google.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tytso@mit.edu \
--cc=yebin@huaweicloud.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).