From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06F40C433DB for ; Mon, 4 Jan 2021 02:58:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C39212074B for ; Mon, 4 Jan 2021 02:58:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727964AbhADC5o (ORCPT ); Sun, 3 Jan 2021 21:57:44 -0500 Received: from m97179.mail.qiye.163.com ([220.181.97.179]:47305 "EHLO m97179.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbhADC5o (ORCPT ); Sun, 3 Jan 2021 21:57:44 -0500 Received: from [192.168.122.37] (unknown [218.94.118.90]) by m97179.mail.qiye.163.com (Hmail) with ESMTPA id 04AE7E02C4A; Mon, 4 Jan 2021 10:56:54 +0800 (CST) Subject: Re: make-bcache -B /dev/bcache0 fails, Can't stack bcache on top of bcache To: Cedric.dewijs@eclipso.eu, "linux-bcache@vger.kernel.org" References: From: Dongsheng Yang Message-ID: <68c7ba96-154d-3095-cb31-41e638ecea98@easystack.cn> Date: Mon, 4 Jan 2021 10:57:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSUI3V1ktWUFJV1kPCR oVCBIfWUFZHx1MTEIZTE9NThlDVkpNS0JMSUJLSk5IQkxVGRETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hKQ1VLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OQw6Lyo6Fj08Nh5MES84CR0i Sw0wCzpVSlVKTUtCTElCS0pOTkNCVTMWGhIXVR8UFRwIEx4VHFUCGhUcOx4aCAIIDxoYEFUYFUVZ V1kSC1lBWUlKQ1VCT1VKSkNVQktZV1kIAVlBT01OTzcG X-HM-Tid: 0a76cb537e0c20bdkuqy04ae7e02c4a Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org Hi Cedric,     I have a patch to support overlay bcache, you can find it in branch: https://github.com/yangdongsheng/linux/commits/bcache_writeback     "bcache: support overlay bcache " https://github.com/yangdongsheng/linux/commit/c72756df2d08acbb58565135bbde61134fb3208a     You can give it a try. Thanx 在 2021/1/3 星期日 上午 3:38, Cedric.dewijs@eclipso.eu 写道: > ­I can't stack bcache on top of bcache, This command fails: > # make-bcache -B /dev/bcache0 > Name /dev/bcache0 > Label > Type data > UUID: 758be840-f232-44dd-8e56-83fb55ba20ea > Set UUID: ddbcc87b-d25d-483f-8874-49b80ba26472 > version: 1 > block_size_in_sectors: 1 > data_offset_in_sectors: 16 > [ 5187.054662] sysfs: cannot create duplicate filename '/devices/virtual/block/bcache0/bcache' > [ 5187.054667] CPU: 2 PID: 567 Comm: bcache-register Not tainted 5.9.14-arch1-1 #1 > [ 5187.054669] Hardware name: Hewlett-Packard HP Compaq 8200 Elite CMT PC/1494, BIOS J01 v02.28 03/24/2015 > [ 5187.054670] Call Trace: > [ 5187.054681] dump_stack+0x6b/0x83 > [ 5187.054686] sysfs_warn_dup.cold+0x17/0x24 > [ 5187.054694] sysfs_create_dir_ns+0xc6/0xe0 > [ 5187.054699] kobject_add_internal+0xab/0x2f0 > [ 5187.054703] kobject_add+0x98/0xd0 > [ 5187.054707] ? blk_queue_write_cache+0x2f/0x60 > [ 5187.054723] register_bdev+0x337/0x360 [bcache] > [ 5187.054735] register_bcache+0x43c/0x910 [bcache] > [ 5187.054740] ? kernfs_fop_write+0xce/0x1b0 > [ 5187.054750] ? register_cache+0x1290/0x1290 [bcache] > [ 5187.054753] kernfs_fop_write+0xce/0x1b0 > [ 5187.054756] vfs_write+0xc7/0x210 > [ 5187.054759] ksys_write+0x67/0xe0 > [ 5187.054763] do_syscall_64+0x33/0x40 > [ 5187.054766] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > [ 5187.054769] RIP: 0033:0x7fbd1edb3f67 > [ 5187.054772] Code: 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 > [ 5187.054774] RSP: 002b:00007fff335fa418 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 > [ 5187.054777] RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007fbd1edb3f67 > [ 5187.054778] RDX: 000000000000000d RSI: 0000562bf3f902a0 RDI: 0000000000000003 > [ 5187.054780] RBP: 0000562bf3f902a0 R08: 00007fbd1ee4a040 R09: 00007fbd1ee4a0c0 > [ 5187.054781] R10: 00007fbd1ee49fc0 R11: 0000000000000246 R12: 000000000000000d > [ 5187.054782] R13: 00007fff335fa4a0 R14: 000000000000000d R15: 00007fbd1ee86720 > [ 5187.054787] kobject_add_internal failed for bcache with -EEXIST, don't try to register things with the same name in the same directory. > [ 5187.054789] bcache: register_bdev() error bcache0: error creating kobject > [ 5187.054794] bcache: register_bcache() error : failed to register device > [ 5187.054963] bcache: bcache_device_free() bcache3 stopped > > I expected this command to create a new /dev/bcacheX node. Instead it tries to overwrite /devices/virtual/block/bcache0/bcache > > My versions: > # uname -a > Linux bcache-test 5.9.14-arch1-1 #1 SMP PREEMPT Sat, 12 Dec 2020 14:37:12 +0000 x86_64 GNU/Linux > # pacman -Q bcache-tools > bcache-tools 1.1-1 > > I've used this guide for inspiration: > https://wiki.archlinux.org/index.php/Bcache > > > --- > > Take your mailboxes with you. Free, fast and secure Mail & Cloud: https://www.eclipso.eu - Time to change! > >