Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp527712pxb; Tue, 9 Feb 2021 06:30:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdSTVVACz3+pkBaW8NeCQaQfT60K1b6FN9ykcsBrQr7iRucPO6+/hhyx8AqI5E1rCEQEV5 X-Received: by 2002:a17:906:178d:: with SMTP id t13mr22413258eje.455.1612881032601; Tue, 09 Feb 2021 06:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612881032; cv=none; d=google.com; s=arc-20160816; b=HOiUYwr4TaLf4pBazv/t6djZehlhtPMe+dqUGO28G7Kg5sL4qZP0rL6iEc32dN+Nme eTmgZsmjw1aK+MaP3bUIDUTkjGELjy2oqASF3a8Hj68WRlw2yq0fmKBo+Nqv0P+adcnu mEQsmdO3GbpLqBJWnKHbk+8BqfDNWfpOvXsaVoJ0cb1zUVmEIAPWS9MzSY04ij1PGivg ZTjKwviroioAJa7CuLssawH7sGQ4T7aDoHzjmml8i0vHrN3hmkqIcz0RbRtYEwK99e2G Peez231G+8tPSFupcnbx8yafblkJWWaopewQid8EmEhZqLhpTycrQZxFBmgaujrjENZB dJgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mc9ajK/ExIHzpPYfk2i4tM1eLLMKQGhgH9O5R8zyOqU=; b=eBsWDh2MrFM2zwCCHtP0/b8MK4cccKLaZj9aMSgb45fCGfKIqd85lJweGG/AMOSAYS V6BaKzXLwzAiGnts9A1m9oUzrf8AhmMp+109J9jZICjFOjnvEnZmCkUspmk1+8tLIpAm uUyGQ6WVzi1ZYFpUfTbfAsxI1GvR1vsIAC/WSPzTsBQZ9ypbZQ2r9QTVA3MT8HmnAPfz nGnMt6qz7oC79x9nW8K8goS+eftXkOp0gE0y+z+AShUjTG48K4yHSkdkqpziAW+IsMJW muo6jjammcKpOdZtutWro66/ZAhXEfDbHR1grRotICNdcBDUsj9zDyOjao3mpTXGeYAF Ovyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=ouVVqh2U; 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 m9si16456243ejj.472.2021.02.09.06.30.08; Tue, 09 Feb 2021 06:30:32 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=ouVVqh2U; 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 S231474AbhBIO1Y (ORCPT + 99 others); Tue, 9 Feb 2021 09:27:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230269AbhBIO1R (ORCPT ); Tue, 9 Feb 2021 09:27:17 -0500 Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8503C061786 for ; Tue, 9 Feb 2021 06:26:36 -0800 (PST) Received: by mail-ua1-x936.google.com with SMTP id y35so519652uad.5 for ; Tue, 09 Feb 2021 06:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=mc9ajK/ExIHzpPYfk2i4tM1eLLMKQGhgH9O5R8zyOqU=; b=ouVVqh2U1belsgV04Y2GTHvzxh79luVJ3l8YALSNgGm61/eOOU2lsLpx068nDGY+H2 5vLtmWhUNeK3M5Zd1ICUI+4vVz3lc+1iI4Dbh0jwR7BUTHChQcb5bWLTDAtiHNReOgG3 XnDn+d0opgj17dtKIW0wVlbRBnVcsM5kpZZUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mc9ajK/ExIHzpPYfk2i4tM1eLLMKQGhgH9O5R8zyOqU=; b=gQcn1HFuDki1maQJ4oBjhApVvqmaqHGHRf21LFiErU2SaUhqEqBZmssqbwu3l1tRum 9xrYq/SrJEkn5S6bfzmftK64OnzZRVTBDPLr0FktnNxlrN68kc14lx2uUF+IsWVze/ZN 4jWoPFMEwdKTaQe8Ra4zTpEfMn4fWHLH948XsfP5kDxaLEobqwawTF13FQnU81a0CJYm lLg1kU4X/gkhoCBcgtrSm+HFIcnNe2YkWCVYQI+wiv8Gfck9UZEVRPF88gAa+k6iKBdA xQ1hcufShmjpahCUaZDwIuGMW7KTvRXTMNhE3c47AvOokj2oC1JbIfjDvwNRUoD7SzUF b/tg== X-Gm-Message-State: AOAM533mkSPhogoHtiKjcwuYU8cG3fFt3zF5mDlxf58D3t25o3TtRCYp 6OMwVXfP97cXbApDuSWasEKxviaFjJ4bFCe4FIkj6TM/yaA= X-Received: by 2002:ab0:6f0d:: with SMTP id r13mr13099908uah.8.1612880795818; Tue, 09 Feb 2021 06:26:35 -0800 (PST) MIME-Version: 1.0 References: <20210124232007.21639-1-richard@nod.at> In-Reply-To: <20210124232007.21639-1-richard@nod.at> From: Miklos Szeredi Date: Tue, 9 Feb 2021 15:26:25 +0100 Message-ID: Subject: Re: [PATCH 0/8] MUSE: Userspace backed MTD v3 To: Richard Weinberger Cc: Miquel Raynal , Vignesh Raghavendra , Boris Brezillon , Ron Minnich , sven@narfation.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, fuse-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2021 at 12:21 AM Richard Weinberger wrote: > > I'm happy to announce the first non-RFC version of this patch set. > Over the xmas holidays I found some time to experiment with various users= pace > implementations of MTDs and gave the kernel side more fine-tuning. > > Rationale: > ---------- > > When working with flash devices a common task is emulating them to run va= rious > tests or inspect dumps from real hardware. To achieve that we have plenty= of > emulators in the MTD subsystem: mtdram, block2mtd, nandsim. > > Each of them implements an ad-hoc MTD and have various drawbacks. > Over the last years some developers tried to extend them but these attemp= ts > often got rejected because they added just more adhoc feature instead of > addressing overall problems. > > MUSE is a novel approach to address the need of advanced MTD emulators. > Advanced means in this context supporting different (vendor specific) ima= ge > formats, different ways for fault injection (fuzzing) and recoding/replay= ing > IOs to emulate power cuts. > > The core goal of MUSE is having the complexity on the userspace side and > only a small MTD driver in kernelspace. > While playing with different approaches I realized that FUSE offers every= thing > we need. So MUSE is a little like CUSE except that it does not implement = a > bare character device but an MTD. Looks fine. I do wonder if MUSE should go to drivers/mtd/ instead. Long term goal would be move CUSE to drivers/char and move the transport part of fuse into net/fuse leaving only the actual filesystems (fuse and virtiofs) under fs/. But for now just moving the minimal interface needed for MUSE into a separate header () would work, I guess. Do you think that would make sense? > > Notes: > ------ > > - OOB support is currently limited. Currently MUSE has no support for pro= cessing > in- and out-band in the same MTD operation. It is good enough to make J= FFS2 > happy. This limitation is because FUSE has no support more than one var= iable > length buffer in a FUSE request. > At least I didn=E2=80=99t find a good way to pass more than one buffer = to a request. > Maybe FUSE folks can correct me. :-) If you look at fuse_do_ioctl() it does variable length input and output at the same time. I guess you need something similar to that. Thanks, Miklos