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=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,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 CF57CC169C4 for ; Wed, 6 Feb 2019 17:41:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9954C218C3 for ; Wed, 6 Feb 2019 17:41:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730250AbfBFRlM (ORCPT ); Wed, 6 Feb 2019 12:41:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:45452 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730103AbfBFRlM (ORCPT ); Wed, 6 Feb 2019 12:41:12 -0500 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 5BC6BB61A; Wed, 6 Feb 2019 17:41:11 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 8A2E61E09A8; Wed, 6 Feb 2019 18:41:10 +0100 (CET) Date: Wed, 6 Feb 2019 18:41:10 +0100 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , Matthew Bobrowski , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v5 08/17] fanotify: copy event fid info to user Message-ID: <20190206174110.GA30726@quack2.suse.cz> References: <20190110170444.30616-1-amir73il@gmail.com> <20190110170444.30616-9-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190110170444.30616-9-amir73il@gmail.com> 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 Thu 10-01-19 19:04:35, Amir Goldstein wrote: > If group requested FAN_REPORT_FID and event has file identifier, > copy that information to user reading the event after event metadata. > > fid information is formatted as struct fanotify_event_info_fid > that includes a generic header struct fanotify_event_info_header, > so that other info types could be defined in the future using the > same header. > > metadata->event_len includes the length of the fid information. > > The fid information includes the filesystem's fsid (see statfs(2)) > followed by an NFS file handle of the file that could be passed as > an argument to open_by_handle_at(2). > > Cc: > Signed-off-by: Amir Goldstein > +#define FANOTIFY_EVENT_ALIGN (sizeof(struct fanotify_event_info_header)) Here I did a small change of setting FANOTIFY_EVENT_ALIGN to plain 4. It just seems more logical to me to have the alignment specified as an absolute number rather than a size of some structure... Honza -- Jan Kara SUSE Labs, CR