1. May 25, 2023
    • Amir Goldstein's avatar
      fanotify: support reporting non-decodeable file handles · a95aef69
      Amir Goldstein authored
      
      
      fanotify users do not always need to decode the file handles reported
      with FAN_REPORT_FID.
      
      Relax the restriction that filesystem needs to support NFS export and
      allow reporting file handles from filesystems that only support ecoding
      unique file handles.
      
      Even filesystems that do not have export_operations at all can fallback
      to use the default FILEID_INO32_GEN encoding, but we use the existence
      of export_operations as an indication that the encoded file handles will
      be sufficiently unique and that user will be able to compare them to
      filesystem objects using AT_HANDLE_FID flag to name_to_handle_at(2).
      
      For filesystems that do not support NFS export, users will have to use
      the AT_HANDLE_FID of name_to_handle_at(2) if they want to compare the
      object in path to the object fid reported in an event.
      
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Message-Id: <20230502124817.3070545-5-amir73il@gmail.com>
      a95aef69
    • Amir Goldstein's avatar
      exportfs: allow exporting non-decodeable file handles to userspace · 96b2b072
      Amir Goldstein authored
      
      
      Some userspace programs use st_ino as a unique object identifier, even
      though inode numbers may be recycable.
      
      This issue has been addressed for NFS export long ago using the exportfs
      file handle API and the unique file handle identifiers are also exported
      to userspace via name_to_handle_at(2).
      
      fanotify also uses file handles to identify objects in events, but only
      for filesystems that support NFS export.
      
      Relax the requirement for NFS export support and allow more filesystems
      to export a unique object identifier via name_to_handle_at(2) with the
      flag AT_HANDLE_FID.
      
      A file handle requested with the AT_HANDLE_FID flag, may or may not be
      usable as an argument to open_by_handle_at(2).
      
      To allow filesystems to opt-in to supporting AT_HANDLE_FID, a struct
      export_operations is required, but even an empty struct is sufficient
      for encoding FIDs.
      
      Acked-by: default avatarJeff Layton <jlayton@kernel.org>
      Acked-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Acked-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Message-Id: <20230502124817.3070545-4-amir73il@gmail.com>
      96b2b072
  2. May 23, 2023
  3. May 15, 2023
  4. May 14, 2023
  5. May 13, 2023