Thread (9 messages) 9 messages, 4 authors, 2021-11-02

Re: [PATCH] btrfs: fix CHECK_INTEGRITY warning when !QUEUE_FLAG_WC

From: Wang Yugui <hidden>
Date: 2021-11-02 05:49:18
Also in: oe-kbuild-all

Hi,

This unused variable warning is already fixed in v2.

and some changelog is updated in this v3 too
https://patchwork.kernel.org/project/linux-btrfs/patch/20211027223254.8095-1-wangyugui@e16-tech.com/

Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2021/11/02
Hi wangyugui,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on kdave/for-next]
[also build test ERROR on v5.15 next-20211101]
[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/wangyugui/btrfs-fix-CHECK_INTEGRITY-warning-when-QUEUE_FLAG_WC/20211022-162718
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/ced40ee717d7e4e8a131b61855a86f0d55aaf817
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review wangyugui/btrfs-fix-CHECK_INTEGRITY-warning-when-QUEUE_FLAG_WC/20211022-162718
        git checkout ced40ee717d7e4e8a131b61855a86f0d55aaf817
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):

   fs/btrfs/disk-io.c: In function 'write_dev_flush':
quoted
quoted
fs/btrfs/disk-io.c:3981:24: error: unused variable 'q' [-Werror=unused-variable]
    3981 |  struct request_queue *q = bdev_get_queue(device->bdev);
         |                        ^
   cc1: all warnings being treated as errors


vim +/q +3981 fs/btrfs/disk-io.c

387125fc722a8e Chris Mason       2011-11-18  3974  
387125fc722a8e Chris Mason       2011-11-18  3975  /*
4fc6441aac7589 Anand Jain        2017-06-13  3976   * Submit a flush request to the device if it supports it. Error handling is
4fc6441aac7589 Anand Jain        2017-06-13  3977   * done in the waiting counterpart.
387125fc722a8e Chris Mason       2011-11-18  3978   */
4fc6441aac7589 Anand Jain        2017-06-13  3979  static void write_dev_flush(struct btrfs_device *device)
387125fc722a8e Chris Mason       2011-11-18  3980  {
c2a9c7ab475bc3 Anand Jain        2017-04-06 @3981  	struct request_queue *q = bdev_get_queue(device->bdev);
e0ae999414238a David Sterba      2017-06-06  3982  	struct bio *bio = device->flush_bio;
387125fc722a8e Chris Mason       2011-11-18  3983  
ced40ee717d7e4 wangyugui         2021-10-22  3984  	#ifndef CONFIG_BTRFS_FS_CHECK_INTEGRITY
ced40ee717d7e4 wangyugui         2021-10-22  3985  	/*
ced40ee717d7e4 wangyugui         2021-10-22  3986  	* submit_bio(REQ_SYNC | REQ_PREFLUSH) can be skipped when !QUEUE_FLAG_WC.
ced40ee717d7e4 wangyugui         2021-10-22  3987  	* but btrfsic_submit_bio() != submit_bio() when CONFIG_BTRFS_FS_CHECK_INTEGRITY
ced40ee717d7e4 wangyugui         2021-10-22  3988  	*/
c2a9c7ab475bc3 Anand Jain        2017-04-06  3989  	if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
4fc6441aac7589 Anand Jain        2017-06-13  3990  		return;
ced40ee717d7e4 wangyugui         2021-10-22  3991  	#endif
387125fc722a8e Chris Mason       2011-11-18  3992  
e0ae999414238a David Sterba      2017-06-06  3993  	bio_reset(bio);
387125fc722a8e Chris Mason       2011-11-18  3994  	bio->bi_end_io = btrfs_end_empty_barrier;
74d46992e0d9de Christoph Hellwig 2017-08-23  3995  	bio_set_dev(bio, device->bdev);
8d91012528b3c9 Jan Kara          2017-05-02  3996  	bio->bi_opf = REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH;
387125fc722a8e Chris Mason       2011-11-18  3997  	init_completion(&device->flush_wait);
387125fc722a8e Chris Mason       2011-11-18  3998  	bio->bi_private = &device->flush_wait;
387125fc722a8e Chris Mason       2011-11-18  3999  
43a0111103af2d Lu Fengqi         2017-08-18  4000  	btrfsic_submit_bio(bio);
1c3063b6dbfa03 Anand Jain        2017-12-04  4001  	set_bit(BTRFS_DEV_STATE_FLUSH_SENT, &device->dev_state);
387125fc722a8e Chris Mason       2011-11-18  4002  }
387125fc722a8e Chris Mason       2011-11-18  4003  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help