[Gluster-devel] read-only xlator: ro_open and O_APPEND

Anand Avati avati at gluster.org
Thu Mar 12 17:23:38 UTC 2015


We should probably check O_APPEND in open(). However the check in writev()
is more important, since open() may not always be issued as in NFS.

Thanks

On Tue, 10 Mar 2015 at 23:52 Milind Changire <milindchangire at gmail.com>
wrote:

> The ro_open(...) handler checks for O_WRONLY and O_RDWR flags but not the O_APPEND flag. However, the ro_writev(...) handler takes care of returning an EROFS appropriately. I guess that's probably the reason
> the O_APPEND issue wasn't addressed so far.
>
> Is it imperative that there should be a check for O_APPEND in ro_open(...) which might act as a fail-fast method rather than deferring until a ro_writev(...) is triggered?
>
> However, I haven't attempted creating a read-only file system and checking whether a valid file descriptor is returned or not in a O_APPEND mode.
>
>
> Milind
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20150312/dd0a515f/attachment.html>


More information about the Gluster-devel mailing list