From patchwork Wed Oct 27 12:09:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ye, Huaisheng" X-Patchwork-Id: 12587159 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 090172C87 for ; Wed, 27 Oct 2021 12:09:46 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="290980294" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="290980294" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 05:09:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="486650016" Received: from dev01.bj.intel.com ([10.238.158.57]) by orsmga007.jf.intel.com with ESMTP; 27 Oct 2021 05:09:43 -0700 From: Huaisheng Ye To: dan.j.williams@intel.com, hch@lst.de, vishal.l.verma@intel.com, dave.jiang@intel.com, ira.weiny@intel.com Cc: nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, Huaisheng Ye Subject: [PATCH 2/4] libnvdimm/pmem: implement ->set_read_only to hook into BLKROSET processing Date: Wed, 27 Oct 2021 20:09:35 +0800 Message-Id: <20211027120937.1163744-3-huaisheng.ye@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211027120937.1163744-1-huaisheng.ye@intel.com> References: <20211027120937.1163744-1-huaisheng.ye@intel.com> Precedence: bulk X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Implement the ->set_read_only method for nd_pmem. Signed-off-by: Huaisheng Ye --- drivers/nvdimm/pmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index ef4950f80832..38ede1f44f5f 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -282,6 +282,7 @@ static const struct block_device_operations pmem_fops = { .owner = THIS_MODULE, .submit_bio = pmem_submit_bio, .rw_page = pmem_rw_page, + .set_read_only = nd_set_ro, }; static int pmem_dax_zero_page_range(struct dax_device *dax_dev, pgoff_t pgoff,