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=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 2A5EBC43381 for ; Mon, 18 Mar 2019 10:01:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F30B32063F for ; Mon, 18 Mar 2019 10:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727468AbfCRKBm (ORCPT ); Mon, 18 Mar 2019 06:01:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:34608 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727236AbfCRKBm (ORCPT ); Mon, 18 Mar 2019 06:01:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B1398AEB2; Mon, 18 Mar 2019 10:01:39 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 2C9CD1E425D; Mon, 18 Mar 2019 11:01:38 +0100 (CET) Date: Mon, 18 Mar 2019 11:01:38 +0100 From: Jan Kara To: Matthew Bobrowski Cc: Jan Kara , mtk.manpages@gmail.com, linux-man@vger.kernel.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, amir73il@gmail.com Subject: Re: [RFC PATCH 1/1] fanotify.7, fanotify_init.2, fanotify_mark.2: Document FAN_REPORT_FID and directory modification events Message-ID: <20190318100138.GB9415@quack2.suse.cz> References: <20190313150755.GF9108@quack2.suse.cz> <20190316123519.GA27736@lithium.mbobrowski.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190316123519.GA27736@lithium.mbobrowski.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sat 16-03-19 23:35:21, Matthew Bobrowski wrote: > On Wed, Mar 13, 2019 at 04:07:55PM +0100, Jan Kara wrote: > > Thanks for the manpage updates! Some small comments below. > > > > On Tue 12-03-19 13:48:29, Matthew Bobrowski wrote: > > > +.TP > > > +.B FAN_MOVED_FROM > > > +Create an event when a marked file or directory is moved from the current > > > +location. > > > +.TP > > > +.B FAN_MOVED_TO > > > +Create an event when a marked file or directory is moved to a new > > > +location. > > > > For these two events (like other directory events), marked thing is > > actually again the parent directory - i.e., these events trigger is > > something is moved to / from marked directory. So I think it would be > > clearer and use the same language like e.g. for FAN_CREATE and speak about > > marked parent directory. > > Sure, what changing this to: > > -- > .B FAN_MOVED_FROM > Create an event when a file or directory has been moved from a marked parent > directory. > .TP > .B FAN_MOVED_TO > Create an event when a file or directory has been moved to a marked parent > directory. > -- > > Do you think that's better? I think it's cleaner, but also at the same time > more precise. Yes, I think that's better. > > > +.B FAN_ATTRIB > > > +A file or directory metadata was changed. > > > +.TP > > > +.B FAN_CREATE > > > +A child file or directory was created in a watched parent. > > > +.TP > > > +.B FAN_DELETE > > > +A child file or directory was deleted in a watched parent. > > > +.TP > > > +.B FAN_DELETE_SELF > > > +A watched file or directory was deleted. > > > +.TP > > > +.B FAN_MOVED_FROM > > > +A watched file or directory was moved from the current location. > > > +.TP > > > +.B FAN_MOVED_TO > > > +A watched file or directory was moved to a new location. > > > > The same comment here about parent directory being actually marked. > > Sure, intending to change this to: > > -- > .B FAN_MOVED_FROM > A file or directory has been moved from a watched parent directory. > .TP > .B FAN_MOVED_TO > A file or directory has been moved to a watched parent directory. > -- > > Thoughts? Looks good to me! > > > +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. Thanks! Honza -- Jan Kara SUSE Labs, CR