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=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 4B3F5C2D0EF for ; Tue, 31 Mar 2020 07:48:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24EFB206F5 for ; Tue, 31 Mar 2020 07:48:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730110AbgCaHsc (ORCPT ); Tue, 31 Mar 2020 03:48:32 -0400 Received: from verein.lst.de ([213.95.11.211]:37197 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbgCaHsc (ORCPT ); Tue, 31 Mar 2020 03:48:32 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id ABC3168C4E; Tue, 31 Mar 2020 09:48:28 +0200 (CEST) Date: Tue, 31 Mar 2020 09:48:28 +0200 From: Christoph Hellwig To: Martijn Coenen Cc: Ming Lei , Jens Axboe , Christoph Hellwig , Bart Van Assche , Chaitanya Kulkarni , linux-block , LKML , kernel-team@android.com Subject: Re: [PATCH] loop: Add LOOP_SET_FD_WITH_OFFSET ioctl. Message-ID: <20200331074828.GA24372@lst.de> References: <20200329140459.18155-1-maco@android.com> <20200330010024.GA23640@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 30, 2020 at 10:06:41AM +0200, Martijn Coenen wrote: > Hi Ming, > > On Mon, Mar 30, 2020 at 3:00 AM Ming Lei wrote: > > The new ioctl LOOP_SET_FD_WITH_OFFSET looks not generic enough, could > > you consider to add one ioctl LOOP_SET_FD_AND_STATUS to cover both > > SET_FD and SET_STATUS so that using two ioctl() to setup loop can become > > deprecated finally? > > I originally started out doing that. However, it is a significantly > larger refactoring of the loop driver, and it makes things like error > handling more complex. I thought configuring loop with an offset is > the most common case. But if there's a preference to do an ioctl that > takes the full status, I can work on that. I think the full blown set fd an status would seem a lot more useful, or even better a LOOP_CTL_ADD variant that sets up everything important on the character device so that we avoid the half set up block devices entirely.