From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 266FDC282CE for ; Mon, 11 Feb 2019 15:23:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E799621B26 for ; Mon, 11 Feb 2019 15:23:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QbId+fOd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391672AbfBKPXr (ORCPT ); Mon, 11 Feb 2019 10:23:47 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:59530 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390564AbfBKPXq (ORCPT ); Mon, 11 Feb 2019 10:23:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZWhhAXdBGsX6PrpXOqWBpKYwfSxrfR+CIlJGmj6JBNQ=; b=QbId+fOdKjW5tAYFGqg9egE7d WEwpGA3lOvrFOoj8IEPNFvuGlDp2rcUEePiGGU9J+ZIrPfGgaqrLHoRP45Up7tKyqw+9FBA4w5lIx DFzR48Z9JJdDodLpZZ8iaLlEiLqwl11hT6a3g3XPC/yseD7NFAL8rg43gzxgnROF14PVfCBY9lyoy yRWSmQ+lgPGXsMOf82MUrnK6hJjCJcQYIGBNrZKQzQKiui6GhqVcpbf8nlJGkbusiA+UdDTcaxtLy 9YPisH3HNrM6f+ggqLBxL3SUe5lhmF1dRC4BMa8FOU03AhVAewDS2Zz4LPfxZI85LQmhC+4SiYk9A 9KnZGYA1A==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtDQw-000437-6p; Mon, 11 Feb 2019 15:23:46 +0000 Date: Mon, 11 Feb 2019 07:23:46 -0800 From: Matthew Wilcox To: Carlos Maiolino Cc: linux-fsdevel@vger.kernel.org, hch@lst.de, adilger@dilger.ca, darrick.wong@oracle.com Subject: Re: Extending FIEMAP ioctl to report device id Message-ID: <20190211152345.GC12668@bombadil.infradead.org> References: <20190211094306.fjr6gfehcstm7eqq@hades.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190211094306.fjr6gfehcstm7eqq@hades.usersys.redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Feb 11, 2019 at 10:43:06AM +0100, Carlos Maiolino wrote: > - The general idea, is to provide a way for FIEMAP ioctls to return the device > id where each extent is physically located. How does userspace get to use this information? If I call fiemap() and it tells me extent 1 is on device 0x12345678 and extent 2 is on device 0x34567812, what can I do with that information? Bear in mind that glibc uses a different dev_t from the kernel. > - This is particularly useful for those filesystems where the file extents are > located on a different block device other than that associated with the > superblock , for example, btrfs using multiple devices, and XFS when using a > real-time device. Darrick said it was useful for _inside_ the kernel. How is it useful for outside the kernel?