Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1634056pxb; Wed, 10 Feb 2021 12:58:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6AvoC7qZS1CSV46rIp3IZxZ3uALKehCAGSdrKKoTDjFr7laM9LP5b490M4uP6/N/1kABb X-Received: by 2002:a17:906:1199:: with SMTP id n25mr4782480eja.431.1612990729741; Wed, 10 Feb 2021 12:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612990729; cv=none; d=google.com; s=arc-20160816; b=z0k+enSXXi8xxGPUJaWlGIZW4Htl/sS0yk3XToakYlNoZ12T/bXpkbOUGhHQs83UPH NSPhA14d2dh32JBjyhlzKpblqvEzYhdGFhHGWMsYuRlGEval9d7sHdIu0WoXZ4KN45CJ A1H6ifKjKL/OwOKE9Pqnu1np7dML2tnxUiXJPMJp/ckwT7/o44PPdk/sy16QorwcfBoo vYbo0Cq4/7sOeM/416M4vsDXXCJ/dRhbbT/q0ca1YtvkZbYcS7yZKcUG4SASG8VcrDQC t517Mpu6rbB+/QOcgB80U/eSON+II/8ENQd4yB4FnsgCifa1DLJOXLLFd8LGYTAFEmap OaAQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=JsYgNs1zn9ZuD9wzo7S7sEu41e33dtkEL8Wq+VKCx7c=; b=vlgaY+kb1DtSWSQDYv+H+8aJjB0gRR6PC3/n93ZK30nm/ulKpgxJmgfNLwJDZPUJ9E h5SDTmScbNUaqffGoa9BEIZOQVVdvrTc5jXT/p/alQXXP5xiFvXxRQ9V200/UolOo+vh nRBnB81F8eyS2vvnd6AAf90mFG+cVBtNYd+aBysxQ7Fj044vuAuE0FzGcQx+L7EUUYp2 t5z2cwMPw5t/dSbZ9VFL10U2vSisugFWDYTcvjqOYXdmRGxmxricuCwuc8b7F/VOaXM1 VprlMM6i1JFY3hRDEZP1hyVnsUGblnycGojKv0alxmXJ0n/MeNFAuiUZqPQWR5to+wVE vyTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz24si2221267ejc.430.2021.02.10.12.58.25; Wed, 10 Feb 2021 12:58:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233308AbhBJU4v convert rfc822-to-8bit (ORCPT + 99 others); Wed, 10 Feb 2021 15:56:51 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:32771 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233187AbhBJU4k (ORCPT ); Wed, 10 Feb 2021 15:56:40 -0500 X-Originating-IP: 90.2.4.167 Received: from xps13 (aputeaux-654-1-105-167.w90-2.abo.wanadoo.fr [90.2.4.167]) (Authenticated sender: miquel.raynal@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 1883CFF803; Wed, 10 Feb 2021 20:55:49 +0000 (UTC) Date: Wed, 10 Feb 2021 21:55:48 +0100 From: Miquel Raynal To: Richard Weinberger Cc: Miklos Szeredi , Vignesh Raghavendra , Boris Brezillon , Ron Minnich , sven , linux-kernel , linux-mtd , fuse-devel Subject: Re: [PATCH 0/8] MUSE: Userspace backed MTD v3 Message-ID: <20210210215548.40ce9ba5@xps13> In-Reply-To: <1183985773.380599.1612956233979.JavaMail.zimbra@nod.at> References: <20210124232007.21639-1-richard@nod.at> <1507208626.379155.1612906761549.JavaMail.zimbra@nod.at> <20210210121429.4fb5ecf3@xps13> <1183985773.380599.1612956233979.JavaMail.zimbra@nod.at> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, Richard Weinberger wrote on Wed, 10 Feb 2021 12:23:53 +0100 (CET): > Miquel, > > ----- Ursprüngliche Mail ----- > >> Does in-band and OOB data need to be handled together? > > > > Short answer: yes. > > > >> If so, then two requests is not a good option. > > > > More detailed answer: > > > > There is a type of MTD device (NAND devices) which are composed, for > > each page, of X in-band bytes plus Y out-of-band metadata bytes. > > > > Accessing either the in-band data, or the out-of-band data, or both at > > the same time are all valid use cases. > > > > * Read operation details: > > From a hardware point of view, the out-of-band data is (almost) > > always retrieved when the in-band data is read because it contains > > meta-data used to correct eventual bitflips. In this case, if both > > areas are requested, it is highly non-efficient to do two requests, > > that's why the MTD core allows to do both at the same time. > > * Write operation details: > > Even worse, in the write case, you *must* write both at the same > > time. It is physically impossible to do one after the other (still > > with actual hardware, of course). > > > > That is why it is preferable that MUSE will be able to access both in > > a single request. > > By single request we meant FUSE op-codes. The NAND simulator in Userspace > will see just one call. My plan is to abstract it in libfuse. If libfuse abstracts it, as long as MTD only sees a single request I'm fine :) Thanks, Miquèl