juicefs icon indicating copy to clipboard operation
juicefs copied to clipboard

Support ioctl

Open davies opened this issue 4 years ago • 9 comments

so we can use lsattr to list the predefine flags on files in JuiceFS, also use chattr to change that.

For the flags, we may want to support: append only (a), no atime updates (A), compressed (c), immutable (i), secure deletion (s), and undeletable (u)

See the man page of chattr, lsattr and ioctl ioctl_list for details.

davies avatar Aug 30 '21 08:08 davies

ltp test: setxattr03, need support for immutable and appendonly flags

SandyXSD avatar Sep 01 '21 03:09 SandyXSD

Hi, I am interested in this issue, can you give me more detailed information?

  • What is the problem that this issue is expected to solve?
  • What is the final functionality to be achieved?
  • Do I need to submit a Proposal?

Xuanwo avatar Nov 17 '21 05:11 Xuanwo

ioctl is a syscall to update a predefined flag on a file/dir, we need to do the following:

  1. support ioctl operation from FUSE
  2. persistent the flags in meta engine
  3. Add API to update the flags for meta engine
  4. For every flag, other related operations should respect it. for example, for a file with immutable flag, we should not modify it.

davies avatar Nov 17 '21 05:11 davies

How 's the current progress? If nobody involves in this support, I'd like to make some contributions.

DMwangnima avatar Nov 27 '21 06:11 DMwangnima

This issue is free for you to take!

Xuanwo avatar Nov 27 '21 07:11 Xuanwo

@DMwangnima Update the description, feel free to take this.

davies avatar Nov 27 '21 14:11 davies

Copy that~

DMwangnima avatar Nov 27 '21 15:11 DMwangnima

@davies Now juicefs uses RawFileSystem interface given by go-fuse, but go-fuse doesn't support ioctl even encoding or decoding datum from ioctl syscall. 截屏2021-11-29 下午6 52 47 So do I need to make a PR to go-fuse to implement ioctl or make a fork form go-fuse just for juicefs?

DMwangnima avatar Nov 29 '21 11:11 DMwangnima

We can fork it, add ioctl, use the fork in JuiceFS, then upstream it later.

davies avatar Nov 29 '21 11:11 davies