Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp131988ybj; Thu, 19 Sep 2019 11:49:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAXudN1s+Rzg+rFxofuaQgmRFZ47zuEH41r6O4sPWAjdEIMh8cZVL6zDOv4z7nC4mmbP6C X-Received: by 2002:a17:906:80d:: with SMTP id e13mr15543694ejd.72.1568918946312; Thu, 19 Sep 2019 11:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568918946; cv=none; d=google.com; s=arc-20160816; b=EVrgnt1ZroOcHVVNUrWKIz5izvYrPC0ubCOP4liPo2yXE0oyuY9rEaxLbBSPuGyYs7 +rjVwN72OoeYEaC+uL7Ia3lwXapHtji5t5obgBppo6itEVwqOM6t2wruJMPudWgW2bMN 1SdRj9UOmY9Rv1Lbboj52CIbygxvztb4uapPmwYSbcn24oKhoEcIfrNe7mCkRJV3nn1w GcV6Euu/Jsd+pA8ru+OJq6CuRt5SVndz/BLexnBNhZgt9nyeyPx6tfh6NFyNNDFrSsUK 1BB7sj1zpl2T29lk7QWz153QbuSm+FXJlEv1HVvtnkVsboCDzwQ4OkYovE8/06TO5Dev NQuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=e+Le165FOxvtzRMwfFqjOH0U+XVnKpWjfAd4ukIEWR4=; b=BRqN1Jy4/UI9HQdwky+OwHSja1uU1zWZbYcX5LIzS1xbrE2m+D2sA22T6sseWd4sU8 0LczgrY7s/RUL9qvSjpIuSvZGgOhF6MNcSART0CtJ30FxsyBPOsNCxz6FMXeb1d0x3Ns LrWo6qaxxIrtYN19nkGyyY+F0Tiw88WVS3geVK5Oi8tmqbO9z4itSwVIXl2gkcQrw1Yi F6JjdJRUFTeKgzmUUcv7rumlgEZzfpV1XeEMm1BFptGZoDzWBAYq54MKfrR+YMsqgLkB zb+GphtntQp1biGF0ByoY14WVzA5aiwV43v+n6vP6Wiuq/jKk13yscSWvXEBoC5z9qVs OCjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FL9rhk1L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si5107047ejd.142.2019.09.19.11.48.42; Thu, 19 Sep 2019 11:49:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FL9rhk1L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726007AbfISRDw (ORCPT + 99 others); Thu, 19 Sep 2019 13:03:52 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46413 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731729AbfISRDv (ORCPT ); Thu, 19 Sep 2019 13:03:51 -0400 Received: by mail-lj1-f193.google.com with SMTP id e17so4295752ljf.13 for ; Thu, 19 Sep 2019 10:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e+Le165FOxvtzRMwfFqjOH0U+XVnKpWjfAd4ukIEWR4=; b=FL9rhk1LXaWaOToMWtkofnf+ifZC7L6LjK+IHdHsF/ZjKrMGyWQHvozYfnjOkbc2Aa NaQT+Ln1+A5psdVMqEdRU37SGn1dPcL1GnHoARhDT9QcKBubA/swLTsvj8azaK1+sKlm HBGHGssbScaIPzuXiY0UhyHgSHDfp0ZEzinrQ= 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; bh=e+Le165FOxvtzRMwfFqjOH0U+XVnKpWjfAd4ukIEWR4=; b=f2Ykq+beZWntJ80JE8lndS1Y5+VRnYPVCIHZDFGWVDhVYVt3fvFO4exqzLSbwSc1SG BEzbmpa+D4uEIN/1ZcNX/X4gXI0EBUTBaCBeSuCN7h8h2jvJb7q+69bp955IDLOGLeFl QSWdtVBOApYgXF1zevUPbJXiIzTfmKrck5MUI29ezvFdZgHbJGTMZoKFqo9ZJvJubRS3 Ta7tKSjNKMe472ZgPEO1BN9S1g+RyjOtejmUpmQm9e1XD+L0xQFGu9VGKcSSW9lNkbIA h8Jfyb7uSUADRR/8NalBBYtzPGiC3KyfoEFoY11NVXUrqKfrp3ARmU5cG3lSe+J80oIt YmPw== X-Gm-Message-State: APjAAAWKAYquy4sD4CZ0snWjbCQisFtUedEHrxWqdrZmZhMVGDGEv6jr SFNwIn1+0aX0fDexZr83sTfolxEDcso= X-Received: by 2002:a2e:8084:: with SMTP id i4mr1051887ljg.119.1568912628259; Thu, 19 Sep 2019 10:03:48 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id l23sm1756856lje.106.2019.09.19.10.03.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Sep 2019 10:03:47 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id x80so2928436lff.3 for ; Thu, 19 Sep 2019 10:03:47 -0700 (PDT) X-Received: by 2002:ac2:5c11:: with SMTP id r17mr5667771lfp.61.1568912626555; Thu, 19 Sep 2019 10:03:46 -0700 (PDT) MIME-Version: 1.0 References: <20190917152140.GU2229799@magnolia> <20190919034502.GJ2229799@magnolia> In-Reply-To: <20190919034502.GJ2229799@magnolia> From: Linus Torvalds Date: Thu, 19 Sep 2019 10:03:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] iomap: new code for 5.4 To: "Darrick J. Wong" Cc: "Darrick J. Wong" , linux-fsdevel , linux-xfs , Dave Chinner , Linux Kernel Mailing List , Eric Sandeen , Christoph Hellwig , Andreas Gruenbacher , Bob Peterson , cluster-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 18, 2019 at 8:45 PM Darrick J. Wong wrote: > > I propose the following (assuming Linus isn't cranky enough to refuse > the entire iomap patchpile forever): Since I don't think the code was _wrong_, it was just that I didn't want to introduce a new pattern for something we already have, I'd be ok with just a fix patch on top too. And if the xfs people really want to use the "pop" model, that's fine too - just make it specific to just the iomap_ioend type, which is all you seem to really want to pop, and make the typing (and naming) be about that particular thing. As mentioned, I don't think that whole "while (pop)" model is _wrong_ per se. But I also don't like proliferating new random list users in general, just because some subsystem has some internal preference. See? And I notice that one of the users actually does keep the list around and modifies it, ie this one: while ((ioend = list_pop_entry(&tmp, struct xfs_ioend, io_list))) { xfs_ioend_try_merge(ioend, &tmp); xfs_end_ioend(ioend); } actually seems to _work_ on the remaining part of the list in that xfs_ioend_try_merge() function. So inside of xfs, that "pop ioend from the list" model really may make perfect sense, and you could just do static inline struct xfs_ioend *xfs_pop_ioend(struct list_head *head) { struct xfs_ioend *ioend = list_first_entry_or_null(head, struct xfs_ioend *, io_list); if (ioend) list_del(&ioend->io_list); return ioend; } and I don't think it's wrong. It's just that we've survived three decades without that list_pop(), and I don't want to make our header files even bigger and more complex unless we actually have multiple real users. Linus