fuse: convert to fileattr
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 8 Apr 2021 09:11:19 +0000 (11:11 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 12 Apr 2021 13:04:30 +0000 (15:04 +0200)
commit72227eac177dd126355ab8d8bd71b46af56c5cf3
tree7851feb59c59137c5eab10c974a011ea56cdc98a
parentb9d54c6f29d9dc04d3fa92e466349d3dfea58eb2
fuse: convert to fileattr

Since fuse just passes ioctl args through to/from server, converting to the
fileattr API is more involved, than most other filesystems.

Both .fileattr_set() and .fileattr_get() need to obtain an open file to
operate on.  The simplest way is with the following sequence:

  FUSE_OPEN
  FUSE_IOCTL
  FUSE_RELEASE

If this turns out to be a performance problem, it could be optimized for
the case when there's already a file (any file) open for the inode.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/ioctl.c