Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2433625pxb; Thu, 4 Nov 2021 21:06:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN7BcMlasxVkZAiS1NneLLvRS3VJ/BlOSupiavr5B4YDs9Rx5cucH7U+RQLWh+mzlJ4iNZ X-Received: by 2002:a05:6e02:144b:: with SMTP id p11mr27352966ilo.70.1636085187730; Thu, 04 Nov 2021 21:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636085187; cv=none; d=google.com; s=arc-20160816; b=hM7T9DxAUJJPMJrXSl9AzM0qgHjUhGG6FHts/1EHFykdqmK7pDapA9b+129gCVrkbG Tg1gBsbsjSSqYTVu/S0iEn8il4AS2ANZzb/9139fsXb4ow/y+QRSVClt/3uTiBKnNE4A 63E6oH/DjO0tijj0JEXasbsl04vg45/jh2aAsGa7P8d4YsPjDJu0IJ+hlta+mQjiNp/V Agqchs9eCyOdcErWfSn/zwQ55Qvo6ROJWdWYy/gONCCo9gzi/3GAhosUwk8mMA99ylU6 AbcpcGIcIrmbr3TF1J6Y6awr2sPfr9WW4pZnyLO38j9sdrvzoxy/sed7Cp5PTpxYgFmb dOEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=cAJgqcEqoPk8/87Ll2/YaB3dlAtpyhofFAOhVNVJWo4=; b=RlJsS8v8hiQQ7izOBQr2V+LIJ+nJ2Q88otI0wFgOyUUUMOHSPtFT8gz1P2viISWlxX 7j8EnYdn+C6d2iQ9nxui50BBP8LS34yhVOydUDUXIUhSkW1h7/v1JV8gT2GK4qvZK4dO 75HrFi9Y+SGVZLKPG9ACGgv+RVrpUoyYXG5KdtUrNEgdfG4lxpKt65XUxqpAIz78XGru YyJGalOvD+YfX6T2WoLrCZbLvJ3zok5cNnqqUddNUa3U8Flo6HRvAPxYvBp2XUJdGDje tOeXkwBXuNqPXbSbd5+aWd8sO4RI96vm0RrpHdqevG0kfkcFSfFMGhMX23TxuB6Y4uPF Nw3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 n13si5422278ili.85.2021.11.04.21.05.36; Thu, 04 Nov 2021 21:06:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbhKEDMd (ORCPT + 99 others); Thu, 4 Nov 2021 23:12:33 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:34350 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229647AbhKEDMd (ORCPT ); Thu, 4 Nov 2021 23:12:33 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 1A539JCp001043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Nov 2021 23:09:19 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 215AA15C00B9; Thu, 4 Nov 2021 23:09:19 -0400 (EDT) Date: Thu, 4 Nov 2021 23:09:19 -0400 From: "Theodore Ts'o" To: "Darrick J. Wong" Cc: Dan Williams , Christoph Hellwig , Eric Sandeen , Mike Snitzer , Ira Weiny , device-mapper development , linux-xfs , Linux NVDIMM , linux-s390 , linux-fsdevel , linux-erofs@lists.ozlabs.org, linux-ext4 , virtualization@lists.linux-foundation.org Subject: Re: futher decouple DAX from block devices Message-ID: References: <20211018044054.1779424-1-hch@lst.de> <21ff4333-e567-2819-3ae0-6a2e83ec7ce6@sandeen.net> <20211104081740.GA23111@lst.de> <20211104173417.GJ2237511@magnolia> <20211104173559.GB31740@lst.de> <20211104190443.GK24333@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211104190443.GK24333@magnolia> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Nov 04, 2021 at 12:04:43PM -0700, Darrick J. Wong wrote: > > Note that I've avoided implementing read/write fops for dax devices > > partly out of concern for not wanting to figure out shared-mmap vs > > write coherence issues, but also because of a bet with Dave Hansen > > that device-dax not grow features like what happened to hugetlbfs. So > > it would seem mkfs would need to switch to mmap I/O, or bite the > > bullet and implement read/write fops in the driver. > > That ... would require a fair amount of userspace changes, though at > least e2fsprogs has pluggable io drivers, which would make mmapping a > character device not too awful. > > xfsprogs would be another story -- porting the buffer cache mignt not be > too bad, but mkfs and repair seem to issue pread/pwrite calls directly. > Note that xfsprogs explicitly screens out chardevs. It's not just e2fsprogs and xfsprogs. There's also udev, blkid, potententially systemd unit generators to kick off fsck runs, etc. There are probably any number of user scripts which assume that file systems are mounted on block devices --- for example, by looking at the output of lsblk, etc. Also note that block devices have O_EXCL support to provide locking against attempts to run mkfs on a mounted file system. If you move dax file systems to be mounted on a character mode device, that would have to be replicated as well, etc. So I suspect that a large number of subtle things would break, and I'd strongly recommend against going down that path. - Ted