From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 516611B1D65 for ; Fri, 3 Jan 2025 06:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735887451; cv=none; b=srsocoLUX/bOE5XbK0DV81NHnPlRxXl2mOO1uXbrihK2zaVMEszPcRmbaAETVksGxtrKvl216ApEtkJaMakzIrf30Nhy1xu8xg16X6xHuoPXrVh0ZQp+zhc9iHfWTQ3p/CZ1ejqTsTcxEQbvT8tXaP1Y1gGu1IUZEuC2BICCO4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735887451; c=relaxed/simple; bh=/Smf/S+He58GVleLAeLb/9PDHS3TvdMcelGbVxVox1k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iekCKvTsw5hAlnsYDoD0Ok5/1vrvZPpqIx5/gSjFQOyKnRbJZLsDESXAC6cQ27iLUg+/eikL2pX9loo0z8bJ7z5L9C3Qx29u1RVhd5vNB7Wx2W/yXFVZ3TKKhxfsbLt+hP4tHdpWUCsA/E8YDmlL7P5115jYl1g6Dieke0r42As= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 3D01268BEB; Fri, 3 Jan 2025 07:57:25 +0100 (CET) Date: Fri, 3 Jan 2025 07:57:25 +0100 From: Christoph Hellwig To: Atharva Tiwari Cc: James Smart , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme-fc: add DIF support for intergrity metadata Message-ID: <20250103065725.GA28303@lst.de> References: <20241226091415.354329-1-evepolonium@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241226091415.354329-1-evepolonium@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Dec 26, 2024 at 02:44:15PM +0530, Atharva Tiwari wrote: > This patch enhances the NVMe over Fibre Channel (NVMe-FC) driver to > handle requests with integrity metadata (DIF). > > - Added the inclusion of `` to enable integrity operations. > - Implemented support for mapping integrity metadata using `blk_rq_map_integrity_sg`. > - Ensures proper handling of requests with integrity metadata, including error cases where mapping fails. This isn't really how we write commit logs. The mechanics are visible in the patch. Also please wrap commit log lines after 73 characters. > + /* Handle requests with integrity metadata (DIF) */ > + if (blk_integrity_rq(rq)) { > + ret = blk_rq_map_integrity_sg(rq, freq->sg_table.sgl); > + if (ret < 0) { > + sg_free_table_chained(&freq->sg_table, NVME_INLINE_SG_CNT); > + freq->sg_cnt = 0; > + return -EFAULT; > + } > + freq->sg_cnt += ret; > + } Who is going to look at the integrity sglist? Who is setting a max_integrity_segments value for nvme-fc? How was this tested?