From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, mingzhe.zou@easystack.cn,
colyli@suse.de, andrea.tomassetti-opensource@devo.com,
bcache@lists.ewheeler.net
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
kent.overstreet@gmail.com, linux-bcache@vger.kernel.org,
zoumingzhe@qq.com, Dongsheng Yang <dongsheng.yang@easystack.cn>,
mingzhe <mingzhe.zou@easystack.cn>
Subject: Re: [PATCH v2 3/3] bcache: support overlay bcache
Date: Wed, 15 Mar 2023 07:03:00 +0300 [thread overview]
Message-ID: <ecf6a168-dd9c-4a11-a872-088030ef47a5@kili.mountain> (raw)
In-Reply-To: <20230202030221.14397-3-mingzhe.zou@easystack.cn>
Hi,
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/mingzhe-zou-easystack-cn/bcache-submit-writeback-inflight-dirty-writes-in-batch/20230202-110624
patch link: https://lore.kernel.org/r/20230202030221.14397-3-mingzhe.zou%40easystack.cn
patch subject: [PATCH v2 3/3] bcache: support overlay bcache
config: ia64-randconfig-m031-20230312 (https://download.01.org/0day-ci/archive/20230315/202303150200.4UK2OWti-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202303150200.4UK2OWti-lkp@intel.com/
smatch warnings:
drivers/md/bcache/super.c:1573 flash_dev_run() warn: missing error code 'err'
vim +/err +1573 drivers/md/bcache/super.c
cafe563591446c Kent Overstreet 2013-03-23 1540 static int flash_dev_run(struct cache_set *c, struct uuid_entry *u)
cafe563591446c Kent Overstreet 2013-03-23 1541 {
bbce89267a538f Dongsheng Yang 2023-02-02 1542 int ret;
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1543 int err = -ENOMEM;
cafe563591446c Kent Overstreet 2013-03-23 1544 struct bcache_device *d = kzalloc(sizeof(struct bcache_device),
cafe563591446c Kent Overstreet 2013-03-23 1545 GFP_KERNEL);
cafe563591446c Kent Overstreet 2013-03-23 1546 if (!d)
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1547 goto err_ret;
cafe563591446c Kent Overstreet 2013-03-23 1548
cafe563591446c Kent Overstreet 2013-03-23 1549 closure_init(&d->cl, NULL);
cafe563591446c Kent Overstreet 2013-03-23 1550 set_closure_fn(&d->cl, flash_dev_flush, system_wq);
cafe563591446c Kent Overstreet 2013-03-23 1551
cafe563591446c Kent Overstreet 2013-03-23 1552 kobject_init(&d->kobj, &bch_flash_dev_ktype);
cafe563591446c Kent Overstreet 2013-03-23 1553
4e1ebae3ee4e0c Coly Li 2020-10-01 1554 if (bcache_device_init(d, block_bytes(c->cache), u->sectors,
c62b37d96b6eb3 Christoph Hellwig 2020-07-01 1555 NULL, &bcache_flash_ops))
cafe563591446c Kent Overstreet 2013-03-23 1556 goto err;
cafe563591446c Kent Overstreet 2013-03-23 1557
cafe563591446c Kent Overstreet 2013-03-23 1558 bcache_device_attach(d, c, u - c->uuids);
175206cf9ab631 Tang Junhui 2017-09-07 1559 bch_sectors_dirty_init(d);
cafe563591446c Kent Overstreet 2013-03-23 1560 bch_flash_dev_request_init(d);
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1561 err = add_disk(d->disk);
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1562 if (err)
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1563 goto err;
cafe563591446c Kent Overstreet 2013-03-23 1564
bbce89267a538f Dongsheng Yang 2023-02-02 1565 err = kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache_fdev");
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1566 if (err)
cafe563591446c Kent Overstreet 2013-03-23 1567 goto err;
cafe563591446c Kent Overstreet 2013-03-23 1568
bbce89267a538f Dongsheng Yang 2023-02-02 1569 ret = sysfs_create_link_nowarn(&disk_to_dev(d->disk)->kobj,
bbce89267a538f Dongsheng Yang 2023-02-02 1570 &d->kobj, "bcache");
bbce89267a538f Dongsheng Yang 2023-02-02 1571 if (ret && ret != -EEXIST) {
bbce89267a538f Dongsheng Yang 2023-02-02 1572 pr_err("Couldn't create lagacy flash dev ->bcache");
bbce89267a538f Dongsheng Yang 2023-02-02 @1573 goto err;
Get rid of the "ret" variable and use "err" instead.
bbce89267a538f Dongsheng Yang 2023-02-02 1574 }
bbce89267a538f Dongsheng Yang 2023-02-02 1575
cafe563591446c Kent Overstreet 2013-03-23 1576 bcache_device_link(d, c, "volume");
cafe563591446c Kent Overstreet 2013-03-23 1577
5342fd4255021e Coly Li 2021-01-04 1578 if (bch_has_feature_obso_large_bucket(&c->cache->sb)) {
5342fd4255021e Coly Li 2021-01-04 1579 pr_err("The obsoleted large bucket layout is unsupported, set the bcache device into read-only\n");
5342fd4255021e Coly Li 2021-01-04 1580 pr_err("Please update to the latest bcache-tools to create the cache device\n");
5342fd4255021e Coly Li 2021-01-04 1581 set_disk_ro(d->disk, 1);
5342fd4255021e Coly Li 2021-01-04 1582 }
5342fd4255021e Coly Li 2021-01-04 1583
cafe563591446c Kent Overstreet 2013-03-23 1584 return 0;
cafe563591446c Kent Overstreet 2013-03-23 1585 err:
cafe563591446c Kent Overstreet 2013-03-23 1586 kobject_put(&d->kobj);
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1587 err_ret:
2961c3bbcaec0e Luis Chamberlain 2021-10-15 1588 return err;
cafe563591446c Kent Overstreet 2013-03-23 1589 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
prev parent reply other threads:[~2023-03-15 4:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 3:02 [PATCH v2 1/3] bcache: make writeback inflight configurable in sysfs mingzhe.zou
2023-02-02 3:02 ` [PATCH v2 2/3] bcache: submit writeback inflight dirty writes in batch mingzhe.zou
2023-02-02 3:02 ` [PATCH v2 3/3] bcache: support overlay bcache mingzhe.zou
2023-03-15 4:03 ` Dan Carpenter [this message]
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=ecf6a168-dd9c-4a11-a872-088030ef47a5@kili.mountain \
--to=error27@gmail.com \
--cc=andrea.tomassetti-opensource@devo.com \
--cc=bcache@lists.ewheeler.net \
--cc=colyli@suse.de \
--cc=dongsheng.yang@easystack.cn \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingzhe.zou@easystack.cn \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=zoumingzhe@qq.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 read-only IMAP folder(s) and NNTP newsgroup(s).