GoogleCloudPlatform / gcsfuse

A user-space file system for interacting with Google Cloud Storage
https://cloud.google.com/storage/docs/gcs-fuse
Apache License 2.0
2.06k stars 430 forks source link

Extended Attributes Support (SetXAttr, GetXAttr, ListXAttr) #2525

Open bhawesh-khandelwal opened 1 month ago

bhawesh-khandelwal commented 1 month ago

Describe the issue GCSFuse does not support set and get extend attributes posix operations (SetXAttr, GetXAttr, ListXAttr) and throws operation not supported error for these. This can be very useful for many use cases such as storing filesystem metadata, custom application data etc.

There had been another request raised for similar but slightly different use case where the ask was to copy the metadata in case it is available in the object to local.

The request here is to at least support the operations on extended attributes for the session. These attributes can be stored in the iNode and can be served from the iNode as well. This can be the starting point and later this functionality can be extended to pushing these attributes to the cloud as well.

System & Version (please complete the following information):

Steps to reproduce the behavior with following information:

  1. Mount a gcs bucket using gcsfuse.
  2. Create a file in the mounted directory
  3. Perform SetXAttr operation on the created file.

Additional context Attaching the error screenshot for reference:

Screenshot 2024-09-21 at 9 23 19 PM

SLO: We strive to respond to all bug reports within 24 business hours provided the information mentioned above is included.

bhawesh-khandelwal commented 1 month ago

As mentioned in the description, the request here is to support basic set, get, list operations on extended attributes and the starting can be done with storing them in iNode and later the functionality can be extended to populating them to the storage layer if required. I can work on supporting these operations once the feature request is accepted.

raj-prince commented 1 month ago

Thanks @bhawesh-khandelwal for the suggestion, I will discuss with the team and get back to you.

CC: @mustvicky @marcoa6 @charith87

bhawesh-khandelwal commented 1 month ago

Thanks @raj-prince for the response. This is sort of a pre-req for my project. When can I expect an update on feature acceptance? I can take up the implementation once the feature is accepted.

bhawesh-khandelwal commented 1 month ago

@raj-prince A gentle reminder on this. Were you able to discuss it with the team?

sethiay commented 1 month ago

@bhawesh-khandelwal While we are discussing this internally, it would be really helpful if you can elaborate a bit more on your use-case for extended attributes.

bhawesh-khandelwal commented 1 month ago

@sethiay Sure. Our usecase is basically that we would want to store some extended attributes of the file for the mount session. One process sets these extended attributes on the gcsfuse mounted file and other process poll for these attributes.

Please let me know in case any other information is required.

marcoa6 commented 1 month ago

@bhawesh-khandelwal can you please provide more details on this usecase/project from a workload perspective (ex: AI/ML training, backup, home share, analytical workload, etc)? Also, do you work with a GCP account team you can also pass this request to?

bhawesh-khandelwal commented 4 weeks ago

@marcoa6 Our usecase involves writing to gcs using gcsfuse and then we do backups. From a workload perspective, it is a backup project.