Message ID | 20221209142331.26395-21-sergei.shtepa@veeam.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp837326wrr; Fri, 9 Dec 2022 07:21:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf7f+zgbSKqRMKZ5Q3sy8OOZHDXHD2QuTKFUsz1skMKjEfIogkUHF4t4WLj8FvT5lO5CQiVE X-Received: by 2002:a17:907:8c8e:b0:78d:f457:1063 with SMTP id td14-20020a1709078c8e00b0078df4571063mr6718186ejc.32.1670599306076; Fri, 09 Dec 2022 07:21:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599306; cv=none; d=google.com; s=arc-20160816; b=WJKZuoGIqwxmBSFwn0Hy7zTUDNhLDaSv/AiB2AXSOXQfujnnbvm4Bieej7ixs9zl+B nvmni5ri7NCV45C2v6viIBjSpkrZn+UsAQ7VdRVx1BL0lDoIUvp6V6P3MvApJvKzYaNV OHICdZeecLr0S16jdVTmk4+K7//M43OmPLm343vPRM1q65wRhnRpK8pudBgAMtfo61G7 qfGz/tMTc+aRWB95ISO9qcmRiASII6pGEx80QsLtl1ji9SykQwlD1ee/MVULpBdg4vkh T7qQQeEndeQlb4VjSU1ND1E3gKhSGMMe6UlutyIlG+KIDA5ZkKGAxPR0Y1mUKoj2DH8+ ZeZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w6TzfCo0+zlgk8mkWBLvozZ61mHMj8fuDSVT5ClGaRY=; b=QFgVBq91KmGySQ/EkeBCJSCwaoxeysbbYPJD6WAubvQT99anTq1DDHZL0rAm7+dUWi U8us3CMjoXlgXk0ISWXy98CzN8BsrMccq9XI9REILTEW8tU13weGqwqKnfX8fdttuvSd 9R/1brlycAsxLORxO1f4uW66oopq0nOZ62DqZu+IZUhLlWBpAr6brr0773XVZbz26F4y 2ri/U1kAmY4k0wYVpPVj55YbIYVmWtnz0c0isgaAHalJ0YGyaD/Lglo6U2X2o5en61H3 mshNKb2fthHb/iercOMiLbdD/QDvNOLiHQTp8xuchzgs4cYUvNtvFRR30zPXVY8P8Qy9 vS+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@veeam.com header.s=mx2-2022 header.b=CSSe0ezo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=veeam.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t26-20020a1709060c5a00b007c07ba730c1si36928ejf.375.2022.12.09.07.21.22; Fri, 09 Dec 2022 07:21:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@veeam.com header.s=mx2-2022 header.b=CSSe0ezo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=veeam.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230178AbiLIPOG (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 10:14:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbiLIPOD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Dec 2022 10:14:03 -0500 X-Greylist: delayed 1499 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 09 Dec 2022 07:14:00 PST Received: from mx2.veeam.com (mx2.veeam.com [64.129.123.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B87221C3; Fri, 9 Dec 2022 07:14:00 -0800 (PST) Received: from mail.veeam.com (prgmbx01.amust.local [172.24.128.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.veeam.com (Postfix) with ESMTPS id 3B5494095A; Fri, 9 Dec 2022 09:24:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veeam.com; s=mx2-2022; t=1670595871; bh=w6TzfCo0+zlgk8mkWBLvozZ61mHMj8fuDSVT5ClGaRY=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=CSSe0ezo7TJn+Kt8H6vqSaTjYy0rM3ukfblLos9QrnSlWsPqZ1o1iCDgW8MHD4g7U w/rG8C/BY75N8eIAdRswbRgEN9fRsyi8pnuFSwjG7gi93u7Aw16WG1ABPz2gbzNuYV Rk+VlCJ9YJwbE/IWBWdp0lvtYlvjZ3Y+JCx735Ay36GUxMzAPDYRimsBYRiirNJ+rS SOXPgao+HTEm9f67ZnhF9D5weBKGSujRvO5vkAApFYlmYk5xq6pCskUksMyflhThrS HxzpWWSeacJrWImaAiQ2CCok7XBcILvZnPTJcNTta7ww8S9Bx5uAc04KnPsghbgFnx ygQbaY2GWnM0Q== Received: from ssh-deb10-ssd-vb.amust.local (172.24.10.107) by prgmbx01.amust.local (172.24.128.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Fri, 9 Dec 2022 15:24:25 +0100 From: Sergei Shtepa <sergei.shtepa@veeam.com> To: <axboe@kernel.dk>, <corbet@lwn.net> CC: <linux-block@vger.kernel.org>, <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Sergei Shtepa <sergei.shtepa@veeam.com> Subject: [PATCH v2 20/21] block, blksnap: adds a blksnap to the kernel tree Date: Fri, 9 Dec 2022 15:23:30 +0100 Message-ID: <20221209142331.26395-21-sergei.shtepa@veeam.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221209142331.26395-1-sergei.shtepa@veeam.com> References: <20221209142331.26395-1-sergei.shtepa@veeam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.24.10.107] X-ClientProxiedBy: prgmbx02.amust.local (172.24.128.103) To prgmbx01.amust.local (172.24.128.102) X-EsetResult: clean, is OK X-EsetId: 37303A2924031556627C62 X-Veeam-MMEX: True X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751750337724653369?= X-GMAIL-MSGID: =?utf-8?q?1751750337724653369?= |
Series |
blksnap - block devices snapshots module
|
|
Commit Message
Sergei Shtepa
Dec. 9, 2022, 2:23 p.m. UTC
Signed-off-by: Sergei Shtepa <sergei.shtepa@veeam.com>
---
drivers/block/Kconfig | 2 ++
drivers/block/Makefile | 2 ++
2 files changed, 4 insertions(+)
Comments
Hi Sergei, Thank you for the patch! Yet something to improve: [auto build test ERROR on axboe-block/for-next] [also build test ERROR on linus/master v6.1-rc8 next-20221208] [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/Sergei-Shtepa/blksnap-block-devices-snapshots-module/20221209-231603 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next patch link: https://lore.kernel.org/r/20221209142331.26395-21-sergei.shtepa%40veeam.com patch subject: [PATCH v2 20/21] block, blksnap: adds a blksnap to the kernel tree config: arm-randconfig-r035-20221210 compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0 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 # https://github.com/intel-lab-lkp/linux/commit/79aebb9891b15d1de8770c4fc61f73bc5e251b04 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Sergei-Shtepa/blksnap-block-devices-snapshots-module/20221209-231603 git checkout 79aebb9891b15d1de8770c4fc61f73bc5e251b04 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/block/blksnap/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/block/blksnap/ctrl.c: In function 'ctrl_init': >> drivers/block/blksnap/ctrl.c:45:45: error: invalid use of undefined type 'struct module' 45 | ret = register_chrdev(0, THIS_MODULE->name, &ctrl_fops); | ^~ drivers/block/blksnap/ctrl.c: In function 'ctrl_done': drivers/block/blksnap/ctrl.c:61:54: error: invalid use of undefined type 'struct module' 61 | unregister_chrdev(blk_snap_major, THIS_MODULE->name); | ^~ -- In file included from include/linux/device.h:31, from include/linux/blk_types.h:11, from include/linux/blkdev.h:9, from drivers/block/blksnap/sysfs.c:5: drivers/block/blksnap/sysfs.c: In function 'sysfs_initialize': >> drivers/block/blksnap/sysfs.c:31:63: error: invalid use of undefined type 'struct module' 31 | blk_snap_class = class_create(THIS_MODULE, THIS_MODULE->name); | ^~ include/linux/device/class.h:276:31: note: in definition of macro 'class_create' 276 | __class_create(owner, name, &__key); \ | ^~~~ drivers/block/blksnap/sysfs.c:51:40: error: invalid use of undefined type 'struct module' 51 | THIS_MODULE->name); | ^~ vim +45 drivers/block/blksnap/ctrl.c 2c91bb136c2522 Sergei Shtepa 2022-12-09 40 2c91bb136c2522 Sergei Shtepa 2022-12-09 41 int ctrl_init(void) 2c91bb136c2522 Sergei Shtepa 2022-12-09 42 { 2c91bb136c2522 Sergei Shtepa 2022-12-09 43 int ret; 2c91bb136c2522 Sergei Shtepa 2022-12-09 44 2c91bb136c2522 Sergei Shtepa 2022-12-09 @45 ret = register_chrdev(0, THIS_MODULE->name, &ctrl_fops); 2c91bb136c2522 Sergei Shtepa 2022-12-09 46 if (ret < 0) { 2c91bb136c2522 Sergei Shtepa 2022-12-09 47 pr_err("Failed to register a character device. errno=%d\n", 2c91bb136c2522 Sergei Shtepa 2022-12-09 48 abs(blk_snap_major)); 2c91bb136c2522 Sergei Shtepa 2022-12-09 49 return ret; 2c91bb136c2522 Sergei Shtepa 2022-12-09 50 } 2c91bb136c2522 Sergei Shtepa 2022-12-09 51 2c91bb136c2522 Sergei Shtepa 2022-12-09 52 blk_snap_major = ret; 2c91bb136c2522 Sergei Shtepa 2022-12-09 53 pr_info("Register control device [%d:0].\n", blk_snap_major); 2c91bb136c2522 Sergei Shtepa 2022-12-09 54 return 0; 2c91bb136c2522 Sergei Shtepa 2022-12-09 55 } 2c91bb136c2522 Sergei Shtepa 2022-12-09 56
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index a41145d52de9..81304bfdc30c 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -416,4 +416,6 @@ config BLK_DEV_UBLK source "drivers/block/rnbd/Kconfig" +source "drivers/block/blksnap/Kconfig" + endif # BLK_DEV diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 101612cba303..8414c47960c2 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -40,3 +40,5 @@ obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk/ obj-$(CONFIG_BLK_DEV_UBLK) += ublk_drv.o swim_mod-y := swim.o swim_asm.o + +obj-$(CONFIG_BLK_SNAP) += blksnap/