ovh / svfs

The Swift Virtual File System
Other
374 stars 54 forks source link

suggestion: add to the limitations section in README.md #99

Closed lartaud closed 7 years ago

lartaud commented 7 years ago

Hello.

I would suggest that you add to the “Limitations” that svfs can’t open a file in O_RDWR mode… (For GO users, it means that you can’t use “os.Create”… Took some time to find the problem ;-p)

Regards.

Context

xlucas commented 7 years ago

Hello :)

Yes syscall.Creat will not work.

Just a point of detail : it's not because of O_RDWR but O_TRUNC (source here).

Anyway, both modes are not handled by SVFS and I recognize the "append mode" formulation may be confusing in the README, since people may just strictly think about O_APPEND.

lartaud commented 7 years ago

I am talking about os.Create (source), not syscall.Creat ;-p

And I confirm that os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) works correctly (even if filename already exists), whereas os.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) doesn’t… (just tested…)

Regards

xlucas commented 7 years ago

Oh, allright.