linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: martin@omnibond.com
To: orangefs-devel@lists.orangefs.org, linux-fsdevel@vger.kernel.org,
	hubcap@omnibond.com, walt@omnibond.com, david@omnibond.com
Subject: [RFC] orangefs: non-POSIX I/O semantics
Date: Tue, 19 Jun 2018 16:49:28 -0400	[thread overview]
Message-ID: <20180619204928.GA29391@t480s.mkb.name> (raw)

David Reynolds (david@omnibond.com) has brought an issue to my
attention.

Git does not work on OrangeFS.  Instead it fails as follows.

$ git clone git@github.com:waltligon/orangefs.git
Cloning into 'orangefs'...
remote: Counting objects: 116605, done.
remote: Compressing objects: 100% (5/5), done.
fatal: write error: Permission denied
fatal: index-pack failed

Some investigation has resulted in the following test.  On non-OrangeFS
systems, the following works.  On OrangeFS, the fact that the file has
mode 444 (r--r--r--) prevents the write.

#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>

int main(void)
{
	ssize_t r;
	int fd;
	fd = open("foo", O_RDWR|O_CREAT|O_EXCL, 0444);
	printf("fd: %d\n", fd);
	if (fd == -1)
		return 1;
	r = write(fd, "hello\n", 6);
	printf("r: %d\n", (int)r);
	if (r == -1)
		perror("write");
	return 0;
}

As far as I can tell, the client-core does not have the right capability
to write to the file.  It is not generated because the file is mode 444.
Is it possible to obtain it (as the kernel does know the file is being
opened O_RDWR and can pass this to the client-core), or will the server
refuse it as long as the file is mode 444?

However, I doubt including some logic to obtain a write capability on a
O_WRONLY/O_RDWR file will fix all of our non-POSIX semantics concerning
I/O.  Nothing short of a major redesign will fix everything.  It may
still be worth fixing what we can.

Thoughts?

Martin

                 reply	other threads:[~2018-06-19 20:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180619204928.GA29391@t480s.mkb.name \
    --to=martin@omnibond.com \
    --cc=david@omnibond.com \
    --cc=hubcap@omnibond.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=orangefs-devel@lists.orangefs.org \
    --cc=walt@omnibond.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).