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.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,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 EFF46C4360F for ; Tue, 19 Mar 2019 12:06:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1002217F4 for ; Tue, 19 Mar 2019 12:06:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=mbobrowski-org.20150623.gappssmtp.com header.i=@mbobrowski-org.20150623.gappssmtp.com header.b="APCmwmeS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727504AbfCSMGT (ORCPT ); Tue, 19 Mar 2019 08:06:19 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33129 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727557AbfCSMGR (ORCPT ); Tue, 19 Mar 2019 08:06:17 -0400 Received: by mail-pf1-f195.google.com with SMTP id i19so13543255pfd.0 for ; Tue, 19 Mar 2019 05:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mbobrowski-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=31f7gxRoJatwWSj37hRcFHPR4qMl8JYIURdjE752PmI=; b=APCmwmeS20YCDDI4YRYj01H87NnyKwrnh99pTcdiZ5EMaA/eWSvs4bvBP6B1OJcIrO gOvMzmqgG7FmEneUSO8b1xc+GDCcOg1+RkTZpuQhM84R5A3yDHJn06qVG2s/xfkHiBsR 8ZYvgsrGaMfk2nvPpdtdEsegL1kaBMlaZFnPrV+SXdDKsZw2E6rLfo8Jlt5L2qXCYIwY 9s3228QBALW14FKAZDqfIyMgR+aFFzjA8inbdJ+f11Cm3sFZg1TF3Ns57G+jU2hPd9b5 cnJuTRLnjwQNUT7gDzvPA6ebeLwtunAxZbQzPs8VAKq+BZTLYIOVAT3oQ3UlLd/iiaMP FWGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=31f7gxRoJatwWSj37hRcFHPR4qMl8JYIURdjE752PmI=; b=M5FZEn8j+vYKaq7BgIPvhOJFTjkhWALKF7xgSmoCkawgHwiE3TzLV6CA+vhAwAvwMq WMF4KDG1uIIRav7mo9LkCcIuTVZ85sww72wJkUuEVeggK6uraPs2rGYpnhnqyBKoAGNx sGOftfwTMcH175e55GXY/BF/1j/xDI8xS1FcCzkoyinEzIazdwzxtHa4rBTlULrbbuzl /AfTwsLZNZztQDw3Yjb82UiHMxbNYyoDI1OF62RcQvygjv7GBvlpO+GeF4NSaRgIihhm nWFo7EIw/1AeRVD5/x2dYi/jz8omhgNwFmGS8FDP//1P7hcLdHLrOeVgAf+jTkn8lVOp qt7g== X-Gm-Message-State: APjAAAVJiGgS/Z02pfcngyAV4R9T2Enjsbmc6Y3oTKXXPB8ZYTNhg7WY BLUv7Dg3WcEIBW3A86pMuizs X-Google-Smtp-Source: APXvYqwS6HlUN0ZMXY1bgm/QirLvWes+PE8YYHthKj9Giy6t8REffh22dD4+gnq443XdVfIaSgLANg== X-Received: by 2002:a17:902:8303:: with SMTP id bd3mr1727898plb.10.1552997176686; Tue, 19 Mar 2019 05:06:16 -0700 (PDT) Received: from lithium.mbobrowski.org ([103.230.158.220]) by smtp.gmail.com with ESMTPSA id h126sm37928320pfc.135.2019.03.19.05.06.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 05:06:15 -0700 (PDT) Date: Tue, 19 Mar 2019 23:06:09 +1100 From: Matthew Bobrowski To: Amir Goldstein Cc: Jan Kara , "Michael Kerrisk (man-pages)" , linux-man@vger.kernel.org, linux-api@vger.kernel.org, linux-fsdevel Subject: Re: [RFC PATCH 1/1] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events Message-ID: <20190319120607.GB4589@lithium.mbobrowski.org> References: <20190313150755.GF9108@quack2.suse.cz> <20190316123519.GA27736@lithium.mbobrowski.org> <20190318100138.GB9415@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Mar 18, 2019 at 01:05:13PM +0200, Amir Goldstein wrote: > > > > > +For example, when an fanotify file descriptor is created using > > > > > +.B FAN_REPORT_FID > > > > > +the > > > > > +.I info_type > > > > > +field of this header is set to > > > > > +.BR FAN_EVENT_INFO_TYPE_FID . > > > > > +Event listeners can use this field to check that events of the correct > > > > > +type are being received. > > > > > > > > I think here you should also speak about the 'len' field in the header > > > > which can be used to skip additional information that is not understood / > > > > uninteresting for the receiver of the event. > > > > > > I don't have any objections to add this as I do believe mentioning it has > > > added benefit. Perhaps we could consider adding in a section which describes > > > all the fanotify_event_info_header fields? Maybe it's not necessary though, > > > and just mentioning these two fields here would be enough. Thoughts? > > > > Well, there are just two fields - 'info_type' and 'len'. There's also 'pad' > > but that doesn't really count ;). So I think that briefly explaining 'len' > > is all that's needed. If you want to formalize this a bit more in a > > separate section, I'm not opposed but I don't think it's really necessary. Jan, sure I'd have to agree with you, but was just thinking to put the thought out there. > I did not get a reply from Matthew, so to make sure my comment > about 'len' wasn't missed. Sorry Amir, I definitely did see the note you dropped about the 'len' field. Apologies for not getting back to you directly about that. > I think 'len' field should get a similar treatment to 'event_len' - > "In the current implementation, the value of len is always > (event_len - FAN_EVENT_METADATA_LEN). However, the API > is designed..." > > And the same sentence about 'event_len' field is now no longer > correct so it should be updated, e.g.: > > event_len > ... > Without FAN_REPORT_FID, the value of event_len is always > FAN_EVENT_METADATA_LEN. With FAN_REPORT_FID, > event_len also includes the variable length file identifier. Understood, I will make sure to incorporate these details into my revised patch. -- Matthew Bobrowski