read-only open causing file to be truncated with NFSv4/ganesha.
by Pradeep
Hello,
I'm seeing an issue with a specific application flow and with ganesha
server (2.6.5). Here is what the application does:
- fd1 = open (file1, O_WRONLY|O_CREAT|O_TRUNC)
Ganesha creates a state and stores the flags in fd->openflags (see
vfs_open2())
- write (fd1, ....)
- fd2 = open(file1, O_RDONLY)
Ganesha finds the state for the first open, finds the flags and calls
fsal_reopen2() with old and new flags OR'd together. This causes the file
to be truncated because the original open was done with O_TRUNC.
I don't see this behavior with kernel NFS or a local filesystem. Any
suggestions on fixing this? Here is a quick and dirty program to reproduce
it - you can see that the second stat prints zero as size with a mount from
Ganesha server.
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char **argv)
{
char *fn = argv[1];
int fd;
char buf[1024];
struct stat stbuf;
int rc;
fd = open(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666);
printf("open(%s) = %d\n", fn, fd);
ssize_t ret;
ret = write(fd, buf, sizeof(buf));
printf("write returned %ld\n", ret);
rc = stat(fn, &stbuf);
printf("size: %ld\n", stbuf.st_size);
int fd1;
fd1 = open(fn, O_RDONLY);
printf("open(%s) = %d\n", fn, fd1);
rc = stat(fn, &stbuf);
printf("size: %ld\n", stbuf.st_size);
}
Thanks,
Pradeep
6 years, 1 month
Change in ffilz/nfs-ganesha[next]: status2 should not return FSAL_O_TRUNC
by GerritHub
From Sachin Punadikar <psachin(a)in.ibm.com>:
Sachin Punadikar has uploaded this change for review. ( https://review.gerrithub.io/430435
Change subject: status2 should not return FSAL_O_TRUNC
......................................................................
status2 should not return FSAL_O_TRUNC
"status2" call returns earlier open_flags. If earlier open was with
FSAL_O_TRUNC, then next open (reopen) truncates the file, due to ORing
of old open flags with new one. "status2" should not return FSAL_O_TRUNC
flag if it was set before.
Change-Id: I88200888bf59f73829406a17ff660fd04875fda2
Signed-off-by: Sachin Punadikar <psachin(a)in.ibm.com>
---
M src/FSAL/FSAL_CEPH/handle.c
M src/FSAL/FSAL_RGW/handle.c
M src/FSAL/default_methods.c
3 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/35/430435/1
--
To view, visit https://review.gerrithub.io/430435
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I88200888bf59f73829406a17ff660fd04875fda2
Gerrit-Change-Number: 430435
Gerrit-PatchSet: 1
Gerrit-Owner: Sachin Punadikar <psachin(a)in.ibm.com>
6 years, 1 month
Change in ffilz/nfs-ganesha[next]: FSAL_GLUSTER/lock_op: Unlock fdlock taken incase of error
by GerritHub
From Soumya <skoduri(a)redhat.com>:
Soumya has uploaded this change for review. ( https://review.gerrithub.io/430415
Change subject: FSAL_GLUSTER/lock_op: Unlock fdlock taken incase of error
......................................................................
FSAL_GLUSTER/lock_op: Unlock fdlock taken incase of error
Incase fsal_find_fd fails to return an fd, bail out and
unlock the state_lock taken.
Change-Id: Ic2c06f0e57161fc29b9bf43e776d8419f75b68d8
Signed-off-by: Soumya Koduri <skoduri(a)redhat.com>
---
M src/FSAL/FSAL_GLUSTER/handle.c
1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/15/430415/1
--
To view, visit https://review.gerrithub.io/430415
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2c06f0e57161fc29b9bf43e776d8419f75b68d8
Gerrit-Change-Number: 430415
Gerrit-PatchSet: 1
Gerrit-Owner: Soumya <skoduri(a)redhat.com>
6 years, 1 month
Change in ffilz/nfs-ganesha[next]: WIP - NTIRPC DEPENDENCY TO BE ADDED - Replace request_cb with alloc_c...
by GerritHub
From Frank Filz <ffilzlnx(a)mindspring.com>:
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/430354
Change subject: WIP - NTIRPC DEPENDENCY TO BE ADDED - Replace request_cb with alloc_cb and free_cb
......................................................................
WIP - NTIRPC DEPENDENCY TO BE ADDED - Replace request_cb with alloc_cb and free_cb
Change-Id: I7af9d6b0a147564ab7bcf593481da6cac451b7b8
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/MainNFSD/nfs_rpc_dispatcher_thread.c
M src/include/nfs_init.h
2 files changed, 35 insertions(+), 62 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/54/430354/1
--
To view, visit https://review.gerrithub.io/430354
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7af9d6b0a147564ab7bcf593481da6cac451b7b8
Gerrit-Change-Number: 430354
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
6 years, 1 month
Change in ffilz/nfs-ganesha[next]: rpc_callback : check return value for nfs_rpc_create_chan_v40() properly
by GerritHub
From Jiffin Tony Thottan <jthottan(a)redhat.com>:
Jiffin Tony Thottan has uploaded this change for review. ( https://review.gerrithub.io/430297
Change subject: rpc_callback : check return value for nfs_rpc_create_chan_v40() properly
......................................................................
rpc_callback : check return value for nfs_rpc_create_chan_v40() properly
nfs_rpc_create_chan_v40() returns zero for sucess, but in nfs_rpc_get_chan() it consider
zero as failure condition
Change-Id: I97fb1d9c2be2da5c1a774f4e68db85cbc72ff005
Signed-off-by: Jiffin Tony Thottan <jthottan(a)redhat.com>
---
M src/MainNFSD/nfs_rpc_callback.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/97/430297/1
--
To view, visit https://review.gerrithub.io/430297
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97fb1d9c2be2da5c1a774f4e68db85cbc72ff005
Gerrit-Change-Number: 430297
Gerrit-PatchSet: 1
Gerrit-Owner: Jiffin Tony Thottan <jthottan(a)redhat.com>
6 years, 1 month
Announce Push of V2.8-dev.2
by Frank Filz
Branch next
Tag:V2.8-dev.2
Release Highlights
* Fix GTEST build
* SAL: Fix dead lock in revoke_owner_delegs()
* NFSv4: avoid delays when client recalls delegations
* Fix compilation on FreeBSD 12
* FSAL_PROXY : module options
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
Contents:
a5a4d49 Frank S. Filz V2.8-dev.2
56ebff4 Patrice LUCAS FSAL_PROXY : module options
2db4401 Fatih Acar Fix compilation on FreeBSD 12
9b5d6bd Fatih Acar NFSv4: avoid delays when client recalls delegations
5decadf Jiffin Tony Thottan SAL: Fix dead lock in revoke_owner_delegs()
777dcc6 Daniel Gryniewicz Fix GTEST build
6 years, 1 month
Change in ffilz/nfs-ganesha[next]: Fix compilation on FreeBSD 12
by GerritHub
From Fatih Acar <fatih(a)gandi.net>:
Fatih Acar has uploaded this change for review. ( https://review.gerrithub.io/429914
Change subject: Fix compilation on FreeBSD 12
......................................................................
Fix compilation on FreeBSD 12
Change-Id: Ia644112dc4bfdc802186447cce3b6c9a2983b034
Signed-off-by: Fatih Acar <fatih.acar(a)gandi.net>
---
M src/os/freebsd/xattr.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/14/429914/1
--
To view, visit https://review.gerrithub.io/429914
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia644112dc4bfdc802186447cce3b6c9a2983b034
Gerrit-Change-Number: 429914
Gerrit-PatchSet: 1
Gerrit-Owner: Fatih Acar <fatih(a)gandi.net>
6 years, 1 month
Fwd: [Gluster-devel] FOSDEM Call for Participation: Software Defined Storage devroom
by Jiffin Tony Thottan
FOSDEM CFP opened for Software Defined Storage Devroom
-------- Forwarded Message --------
Subject: [Gluster-devel] FOSDEM Call for Participation: Software
Defined Storage devroom
Date: Fri, 12 Oct 2018 11:12:01 +0200
From: Niels de Vos <ndevos(a)redhat.com>
Reply-To: storage-devroom(a)lists.fosdem.org
To: gluster-devel(a)gluster.org, gluster-users(a)gluster.org,
lizardfs-users(a)lists.sourceforge.net, freenas-devel(a)lists.freenas.org,
kubernetes-sig-storage(a)googlegroups.com
CC: storage-devroom(a)lists.fosdem.org, fosdem(a)lists.fosdem.org
CfP for the Software Defined Storage devroom at FOSDEM 2019 (Brussels,
Belgium, February 3rd).
FOSDEM is a free software event that offers open source communities a
place to meet, share ideas and collaborate. It is renown for being
highly developer- oriented and brings together 8000+ participants from
all over the world. It is held in the city of Brussels (Belgium).
FOSDEM 2019 will take place during the weekend of February 2nd-3rd 2019.
More details about the event can be found at http://fosdem.org/
** Call For Participation
The Software Defined Storage devroom will go into it's third round for
talks around Open Source Software Defined Storage projects, management
tools and real world deployments.
Presentation topics could include but are not limited too:
- Your work on a SDS project like Ceph, Gluster, OpenEBS or LizardFS
- Your work on or with SDS related projects like SWIFT or Container
Storage Interface
- Management tools for SDS deployments
- Monitoring tools for SDS clusters
** Important dates:
- Nov 25th 2018: submission deadline for talk proposals
- Dec 17th 2018: announcement of the final schedule
- Feb 3rd 2019: Software Defined Storage dev room
Talk proposals will be reviewed by a steering committee:
- Niels de Vos (Gluster Developer - Red Hat)
- Jan Fajerski (Ceph Developer - SUSE)
- other volunteers TBA
Use the FOSDEM 'pentabarf' tool to submit your proposal:
https://penta.fosdem.org/submission/FOSDEM19
- If necessary, create a Pentabarf account and activate it.
Please reuse your account from previous years if you have already
created it.
- In the "Person" section, provide First name, Last name
(in the "General" tab), Email (in the "Contact" tab) and Bio
("Abstract" field in the "Description" tab).
- Submit a proposal by clicking on "Create event".
- Important! Select the "Software Defined Storage devroom" track (on the
"General" tab).
- Provide the title of your talk ("Event title" in the "General" tab).
- Provide a description of the subject of the talk and the intended
audience (in the "Abstract" field of the "Description" tab)
- Provide a rough outline of the talk or goals of the session (a short
list of bullet points covering topics that will be discussed) in the
"Full description" field in the "Description" tab
- Provide an expected length of your talk in the "Duration" field. Please
count at least 10 minutes of discussion into your proposal plus allow
5 minutes for the handover to the next presenter.
Suggested talk length would be 20+10 and 45+15 minutes.
** Recording of talks
The FOSDEM organizers plan to have live streaming and recording fully
working, both for remote/later viewing of talks, and so that people can
watch streams in the hallways when rooms are full. This requires
speakers to consent to being recorded and streamed. If you plan to be a
speaker, please understand that by doing so you implicitly give consent
for your talk to be recorded and streamed. The recordings will be
published under the same license as all FOSDEM content (CC-BY).
Hope to hear from you soon! And please forward this announcement.
If you have any further questions, please write to the mailinglist at
storage-devroom(a)lists.fosdem.org and we will try to answer as soon as
possible.
Thanks!
_______________________________________________
Gluster-devel mailing list
Gluster-devel(a)gluster.org
https://lists.gluster.org/mailman/listinfo/gluster-devel
6 years, 1 month
Re: [Nfs-ganesha-devel] Crash in libntirpc with 1.6.3 version
by William Allen Simpson
On 10/16/18 1:55 AM, Soumya Koduri wrote:
> This list has been deprecated. Please subscribe to the new devel list at lists.nfs-ganesha.org.
> There is similar crash (in 'svc_release_it') hit when rpc callback channel is used. Jiffin reported the same in github [1]. Somewhere in cbk paths probably, xprt->ref is not taken.
>
> Thanks,
> Soumya
>
>
> [1] https://github.com/nfs-ganesha/ntirpc/issues/153
>
Please test Ganesha 2.7.1 (rpc 1.7.1). Not everything has been
backported, even though I flagged stuff for backport to rpc 1.6
more than half a year ago. As I've already mentioned....
I've given up on Ganesha 2.6. I'm working on rebasing for 2.8.
6 years, 1 month
Change in ffilz/nfs-ganesha[next]: Remove unexported export on SIGHUP.
by GerritHub
From Krishna Harathi <krishna.harathi(a)storagecraft.com>:
Krishna Harathi has uploaded this change for review. ( https://review.gerrithub.io/429698
Change subject: Remove unexported export on SIGHUP.
......................................................................
Remove unexported export on SIGHUP.
Cleanup and remove VFS FSAL exports that are unexported during
SIGHUP handling. This allows an export reuse the same device
major and minor.
Change-Id: I8f885e30a907bb70b1d89d2767f47e8bf637a866
Signed-off-by: Krishna Harathi <krishna.harathi(a)storagecraft.com>
---
M src/FSAL/FSAL_VFS/export.c
M src/include/FSAL/fsal_commonlib.h
2 files changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/98/429698/1
--
To view, visit https://review.gerrithub.io/429698
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f885e30a907bb70b1d89d2767f47e8bf637a866
Gerrit-Change-Number: 429698
Gerrit-PatchSet: 1
Gerrit-Owner: Krishna Harathi <krishna.harathi(a)storagecraft.com>
6 years, 1 month