From: kernel test robot <lkp@intel.com>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-block@vger.kernel.org, Ming Lei <ming.lei@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
yukuai <yukuai3@huawei.com>,
Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: [PATCH] block: fix "Directory XXXXX with parent 'block' already present!"
Date: Fri, 22 Apr 2022 07:06:35 +0800 [thread overview]
Message-ID: <202204220614.mF9U5ks7-lkp@intel.com> (raw)
In-Reply-To: <20220421083431.2917311-1-ming.lei@redhat.com>
Hi Ming,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on v5.18-rc3 next-20220421]
[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/Ming-Lei/block-fix-Directory-XXXXX-with-parent-block-already-present/20220421-163556
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: arm64-randconfig-r034-20220421 (https://download.01.org/0day-ci/archive/20220422/202204220614.mF9U5ks7-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/746684a4668ee70b284126159a10f98ff7ebb319
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Ming-Lei/block-fix-Directory-XXXXX-with-parent-block-already-present/20220421-163556
git checkout 746684a4668ee70b284126159a10f98ff7ebb319
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> block/blk-sysfs.c:841:22: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
blk_debugfs_root, kobject_name(q->kobj.parent));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/debugfs.h:252:47: note: passing argument to parameter 'new_name' here
struct dentry *new_dir, char *new_name)
^
1 error generated.
vim +841 block/blk-sysfs.c
808
809 /**
810 * blk_register_queue - register a block layer queue with sysfs
811 * @disk: Disk of which the request queue should be registered with sysfs.
812 */
813 int blk_register_queue(struct gendisk *disk)
814 {
815 int ret;
816 struct device *dev = disk_to_dev(disk);
817 struct request_queue *q = disk->queue;
818
819 ret = blk_trace_init_sysfs(dev);
820 if (ret)
821 return ret;
822
823 mutex_lock(&q->sysfs_dir_lock);
824
825 ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue");
826 if (ret < 0) {
827 blk_trace_remove_sysfs(dev);
828 goto unlock;
829 }
830
831 ret = sysfs_create_group(&q->kobj, &queue_attr_group);
832 if (ret) {
833 blk_trace_remove_sysfs(dev);
834 kobject_del(&q->kobj);
835 kobject_put(&dev->kobj);
836 goto unlock;
837 }
838
839 mutex_lock(&q->debugfs_mutex);
840 q->debugfs_dir = debugfs_rename(blk_debugfs_root, q->debugfs_dir,
> 841 blk_debugfs_root, kobject_name(q->kobj.parent));
842 mutex_unlock(&q->debugfs_mutex);
843
844 if (queue_is_mq(q)) {
845 __blk_mq_register_dev(dev, q);
846 blk_mq_debugfs_register(q);
847 }
848
849 mutex_lock(&q->sysfs_lock);
850
851 ret = disk_register_independent_access_ranges(disk, NULL);
852 if (ret)
853 goto put_dev;
854
855 if (q->elevator) {
856 ret = elv_register_queue(q, false);
857 if (ret)
858 goto put_dev;
859 }
860
861 ret = blk_crypto_sysfs_register(q);
862 if (ret)
863 goto put_dev;
864
865 blk_queue_flag_set(QUEUE_FLAG_REGISTERED, q);
866 wbt_enable_default(q);
867 blk_throtl_register_queue(q);
868
869 /* Now everything is ready and send out KOBJ_ADD uevent */
870 kobject_uevent(&q->kobj, KOBJ_ADD);
871 if (q->elevator)
872 kobject_uevent(&q->elevator->kobj, KOBJ_ADD);
873 mutex_unlock(&q->sysfs_lock);
874
875 unlock:
876 mutex_unlock(&q->sysfs_dir_lock);
877
878 /*
879 * SCSI probing may synchronously create and destroy a lot of
880 * request_queues for non-existent devices. Shutting down a fully
881 * functional queue takes measureable wallclock time as RCU grace
882 * periods are involved. To avoid excessive latency in these
883 * cases, a request_queue starts out in a degraded mode which is
884 * faster to shut down and is made fully functional here as
885 * request_queues for non-existent devices never get registered.
886 */
887 if (!blk_queue_init_done(q)) {
888 blk_queue_flag_set(QUEUE_FLAG_INIT_DONE, q);
889 percpu_ref_switch_to_percpu(&q->q_usage_counter);
890 }
891
892 return ret;
893
894 put_dev:
895 elv_unregister_queue(q);
896 disk_unregister_independent_access_ranges(disk);
897 mutex_unlock(&q->sysfs_lock);
898 mutex_unlock(&q->sysfs_dir_lock);
899 kobject_del(&q->kobj);
900 blk_trace_remove_sysfs(dev);
901 kobject_put(&dev->kobj);
902
903 return ret;
904 }
905
--
0-DAY CI Kernel Test Service
https://01.org/lkp
prev parent reply other threads:[~2022-04-21 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 8:34 [PATCH] block: fix "Directory XXXXX with parent 'block' already present!" Ming Lei
2022-04-21 12:02 ` Shinichiro Kawasaki
2022-04-21 16:09 ` Christoph Hellwig
2022-04-22 3:01 ` Ming Lei
2022-04-22 6:05 ` Christoph Hellwig
2022-04-22 6:43 ` Ming Lei
2022-04-21 16:37 ` Dan Williams
2022-04-21 17:28 ` Hannes Reinecke
2022-04-22 1:23 ` yukuai (C)
2022-04-22 2:52 ` Ming Lei
2022-04-21 20:54 ` kernel test robot
2022-04-21 23:06 ` kernel test robot [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=202204220614.mF9U5ks7-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=dan.j.williams@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-block@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ming.lei@redhat.com \
--cc=shinichiro.kawasaki@wdc.com \
--cc=yukuai3@huawei.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 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.