Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4016278ybg; Fri, 25 Oct 2019 12:08:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzl4d2VN+Qwvu7+Bzh1LRzpYvRitxuCiCdR6FZZbUfUiTYwZJjHBLg8SzQECRRxBqXwiuvv X-Received: by 2002:a50:895c:: with SMTP id f28mr5523509edf.125.1572030493893; Fri, 25 Oct 2019 12:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572030493; cv=none; d=google.com; s=arc-20160816; b=vjCAaQkl2ui8DWrGki1WGXNjlN7ShSnh4u31PlKbzYSgDZXLPFLHYTRgV+Q/114wRo R0XomNfZhV6cyn1nJw212Ata2cWsqCrPnxK2tQZuf/PCEWxqld/fJQ51MWXrR1mb2r2O c7aSjvtfy2rc9FislKzWxgSxxezuXX9aVM/YT+ZSVb1sqR9IetWdZsNQKeC1r0h91aw0 XJI3Ntnwlz5jfMd8QQ+lbWeheWPI8pEu1pedNRvLIpabWLezFm/Jkdj0Q9ZyPKr8r+Vi HMmqM5fqxB+/l2Ihb5Ov/oBzoGXF5CwHOFpDP8ieEKp89yhdCsR+OeqKtO8A1QAlaZ8r uKSA== 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=h5FP/voiQdxeaQU3Va8HH5cRZmi1OHTMwBKcRrrOo6E=; b=TgULDYk3l4bRjhKnFkACbNk8TiVgRN9NmYXBre3Hrfhvn3ozzqmakxuTR15rPGr8S+ cI5wf/fcJUbjZBnRL1N3gkO0YEAUMIn65lVhUJafHf1bosN7H9gRppGZ/ONP5d4q/uJA 8eIpSpu8/7RjWawXNZAs0gfEtekQ4fJ1AADgRnGoWUdhx8+306tuITwjpBXl6i8jZFMD wUuZ/NtmQAIJqF8Xntrcz/LPm8Paj+q+grcPSpUR3oZSGjp0IHKuALMhxlhlWu6JIK32 8UxtxbPA4U623oRLhmmrm6GkdhOIWCNj0wckjOOTcbNpY3zVFdUO/UYoh/reJztiExmQ hbGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=G+CKE+0s; 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 g12si1864033ejf.379.2019.10.25.12.07.50; Fri, 25 Oct 2019 12:08:13 -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=G+CKE+0s; 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 S1729290AbfJXVaO (ORCPT + 99 others); Thu, 24 Oct 2019 17:30:14 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:38676 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729262AbfJXVaN (ORCPT ); Thu, 24 Oct 2019 17:30:13 -0400 Received: by mail-lf1-f68.google.com with SMTP id q28so17082999lfa.5 for ; Thu, 24 Oct 2019 14:30:11 -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=h5FP/voiQdxeaQU3Va8HH5cRZmi1OHTMwBKcRrrOo6E=; b=G+CKE+0sNMbBuosjchwhgzz8NQwfbV/8kKBYcW1zgIA+wCHZXB0W4xnrddKNkrujly nBXQf8TMFFxtwDaqAlubm1WQBu/DIP2jq0ClHTeKxpnxD8j4n3vqHGpl41RLHFrD0jXc jfdzDY5G/0JxiPvAj8Pc7cihC14c7Kl2f6hiQ= 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=h5FP/voiQdxeaQU3Va8HH5cRZmi1OHTMwBKcRrrOo6E=; b=h7A0jEY+aNfAfJ8RCmlZK4neNBVBlJ/+iBd3dpCfmjrZerBvc4pJ/PgVD+YqsiaZhp yO7xp1Plxyyw34Do5GAz1Yjt01kZ9EEklsv2MXK3eehzRzNwXjO7fpd055At759178wO 01B9wKLLCCgeC13iVTlHgSSuk+zhaEFfdWz9w3tciaEwEKZxTdAGaGAhClac/0bcFIOI rPzrdyD20SMuuJqjsF5fQoEeXREDIjB1X7fn6I3SRx0kPQciq2NXtZn/yfiEFLi672Wf 4edVD9FaxkQgWZXaLRTyU5oFcPxIKF1RDtNIHlYgLgfngfZijuQf7tkmYJJpMM86x//e Q8Pg== X-Gm-Message-State: APjAAAVgEdH7QI9s9QtXDhIUvNrz0qWQ/lRy0NMFRp5Q+/VSKsBSAorz HkzeLGBsFPYHcbmshJGCpOI2Q+fSXnkCTQ== X-Received: by 2002:a19:ac01:: with SMTP id g1mr188110lfc.141.1571952610274; Thu, 24 Oct 2019 14:30:10 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id b141sm12566315lfg.67.2019.10.24.14.30.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Oct 2019 14:30:08 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id y3so257407ljj.6 for ; Thu, 24 Oct 2019 14:30:08 -0700 (PDT) X-Received: by 2002:a05:651c:331:: with SMTP id b17mr3303284ljp.133.1571952607809; Thu, 24 Oct 2019 14:30:07 -0700 (PDT) MIME-Version: 1.0 References: <157186182463.3995.13922458878706311997.stgit@warthog.procyon.org.uk> <30394.1571936252@warthog.procyon.org.uk> In-Reply-To: <30394.1571936252@warthog.procyon.org.uk> From: Linus Torvalds Date: Thu, 24 Oct 2019 17:29:51 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 11/10] pipe: Add fsync() support [ver #2] To: David Howells Cc: Rasmus Villemoes , Greg Kroah-Hartman , Peter Zijlstra , Nicolas Dichtel , raven@themaw.net, Christian Brauner , keyrings@vger.kernel.org, linux-usb@vger.kernel.org, linux-block , LSM List , linux-fsdevel , Linux API , Linux Kernel Mailing List 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 Thu, Oct 24, 2019 at 12:57 PM David Howells wrote: > > pipe: Add fsync() support > > The keyrings testsuite needs the ability to wait for all the outstanding > notifications in the queue to have been processed so that it can then go > through them to find out whether the notifications it expected have been > emitted. Can't you just do ioctl(fd, FIONREAD, &count); in a loop instead? "No paperwork. Just sprinkle some msleep() crack on him, and let's get out of here" Linus