* sendmail "cannot fsync directory" after 2.4 -> 2.6
@ 2004-09-09 6:15 Frank Steiner
2004-09-09 10:39 ` Frank Steiner
2004-09-09 14:58 ` Trond Myklebust
0 siblings, 2 replies; 8+ messages in thread
From: Frank Steiner @ 2004-09-09 6:15 UTC (permalink / raw)
To: nfs
Hi,
we've been running SuSE 9.0 with kernel 2.4.21 for some months. Two weeks
ago we switched to 2.6.8.1 from kernel.org.
Our diskless clients get (due to lack of a local hd) everything via nfs,
including /var/spool/mqueue. The /var directories for the clients (one
seperate for each client) are exported with "sync" and mounted with
"tcp,hard,intr,lock,sync", and this has not changed when switching from
2.4 to 2.6. But after we switched to 2.6.8.1, we get messages
Sep 9 08:03:13 galois sendmail[21596]: sync_dir: cannot fsync directory .: Invalid argument
Sep 9 08:04:02 galois sendmail[21649]: i89641NZ021648: SYSERR(root): sync_dir: cannot fsync directory .: Invalid argument
every time we send a mail with "mail -s test root" or similar. Note that
sendmail is running as daemon on every client, but only listening on
localhost. The sendmail package has REQUIRES_DIR_FSYNC enabled.
I tried mounting the nfs dir with "dirsync" additionally, but it doesn't
help. Also, it doesn't make a difference if the exported fs on the server
is ext3 or reiserfs. Since it works on local disks and worked also over
NFS with kernel 2.4.21, I guess it is a bug in 2.6? Or should it not work
with nfs and 2.4 just didn't notice?
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendmail "cannot fsync directory" after 2.4 -> 2.6
2004-09-09 6:15 sendmail "cannot fsync directory" after 2.4 -> 2.6 Frank Steiner
@ 2004-09-09 10:39 ` Frank Steiner
2004-09-09 14:58 ` Trond Myklebust
1 sibling, 0 replies; 8+ messages in thread
From: Frank Steiner @ 2004-09-09 10:39 UTC (permalink / raw)
To: Frank Steiner; +Cc: nfs
I wrote a little c program to test fsync on nfs directories (must be
called in the directory you want to check):
#include <fcntl.h>
int main() {
int dirfd;
dirfd = open(".",O_RDONLY, 0700);
if (fsync(dirfd) < 0)
printf("failed\n");
else
printf("succeeded\n");
}
Indeed it fails for all nfs-mounted directories when the client is running
kernel 2.6 (tried 2.6.6 and 2.6.8.1), and succeeds for clients running
kernel 2.4, with the same nfs server (regardless if the server is running
2.6 or 2.4).
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: sendmail "cannot fsync directory" after 2.4 -> 2.6
2004-09-09 6:15 sendmail "cannot fsync directory" after 2.4 -> 2.6 Frank Steiner
2004-09-09 10:39 ` Frank Steiner
@ 2004-09-09 14:58 ` Trond Myklebust
2004-09-09 17:54 ` Ara.T.Howard
2004-09-10 7:33 ` Frank Steiner
1 sibling, 2 replies; 8+ messages in thread
From: Trond Myklebust @ 2004-09-09 14:58 UTC (permalink / raw)
To: Frank Steiner; +Cc: nfs
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
På to , 09/09/2004 klokka 02:15, skreiv Frank Steiner:
> Sep 9 08:03:13 galois sendmail[21596]: sync_dir: cannot fsync directory .: Invalid argument
> Sep 9 08:04:02 galois sendmail[21649]: i89641NZ021648: SYSERR(root): sync_dir: cannot fsync directory .: Invalid argument
Yep. We forgot to add the stub to Linux 2.6.x. Please confirm that the
following patch fixes the problem for you.
Cheers,
Trond
[-- Attachment #2: linux-2.6.9-01-add_dummy_fsync.dif --]
[-- Type: text/plain, Size: 1310 bytes --]
NFS: add an fsync() stub for directories
Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
---
dir.c | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: linux-2.6.9-rc1/fs/nfs/dir.c
===================================================================
--- linux-2.6.9-rc1.orig/fs/nfs/dir.c 2004-09-08 21:14:12.000000000 -0400
+++ linux-2.6.9-rc1/fs/nfs/dir.c 2004-09-09 10:53:49.332399870 -0400
@@ -51,12 +51,14 @@
static int nfs_mknod(struct inode *, struct dentry *, int, dev_t);
static int nfs_rename(struct inode *, struct dentry *,
struct inode *, struct dentry *);
+static int nfs_fsync_dir(struct file *, struct dentry *, int);
struct file_operations nfs_dir_operations = {
.read = generic_read_dir,
.readdir = nfs_readdir,
.open = nfs_opendir,
.release = nfs_release,
+ .fsync = nfs_fsync_dir,
};
struct inode_operations nfs_dir_inode_operations = {
@@ -493,6 +495,15 @@
}
/*
+ * All directory operations under NFS are synchronous, so fsync()
+ * is a dummy operation.
+ */
+int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync)
+{
+ return 0;
+}
+
+/*
* A check for whether or not the parent directory has changed.
* In the case it has, we assume that the dentries are untrustworthy
* and may need to be looked up again.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: sendmail "cannot fsync directory" after 2.4 -> 2.6
2004-09-09 14:58 ` Trond Myklebust
@ 2004-09-09 17:54 ` Ara.T.Howard
2004-09-09 18:25 ` Trond Myklebust
2004-09-10 7:33 ` Frank Steiner
1 sibling, 1 reply; 8+ messages in thread
From: Ara.T.Howard @ 2004-09-09 17:54 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Frank Steiner, nfs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed, Size: 953 bytes --]
On Thu, 9 Sep 2004, Trond Myklebust wrote:
> På to , 09/09/2004 klokka 02:15, skreiv Frank Steiner:
>
>> Sep 9 08:03:13 galois sendmail[21596]: sync_dir: cannot fsync directory .: Invalid argument
>> Sep 9 08:04:02 galois sendmail[21649]: i89641NZ021648: SYSERR(root): sync_dir: cannot fsync directory .: Invalid argument
>
> Yep. We forgot to add the stub to Linux 2.6.x. Please confirm that the
> following patch fixes the problem for you.
will fsync'ing a directory have any affect on the client inode cache for that
dir? eg. will it invalidate that cache?
cheers.
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it.
| --Dogen
===============================================================================
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendmail "cannot fsync directory" after 2.4 -> 2.6
2004-09-09 17:54 ` Ara.T.Howard
@ 2004-09-09 18:25 ` Trond Myklebust
0 siblings, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2004-09-09 18:25 UTC (permalink / raw)
To: Ara.T.Howard; +Cc: Frank Steiner, nfs
P=E5 to , 09/09/2004 klokka 13:54, skreiv Ara.T.Howard:
> will fsync'ing a directory have any affect on the client inode cache for =
that
> dir? eg. will it invalidate that cache?
No. It should be a no-op.
Cheers,
Trond
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sendmail "cannot fsync directory" after 2.4 -> 2.6
2004-09-09 14:58 ` Trond Myklebust
2004-09-09 17:54 ` Ara.T.Howard
@ 2004-09-10 7:33 ` Frank Steiner
1 sibling, 0 replies; 8+ messages in thread
From: Frank Steiner @ 2004-09-10 7:33 UTC (permalink / raw)
To: Trond Myklebust; +Cc: nfs
Trond Myklebust wrote:
> Yep. We forgot to add the stub to Linux 2.6.x. Please confirm that the
> following patch fixes the problem for you.
Yes, with that patch it works fine and sendmail stops complaining.
Thanks a lot!
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: sendmail "cannot fsync directory" after 2.4 -> 2.6
@ 2004-09-09 18:54 Lever, Charles
2004-09-09 20:36 ` Ara.T.Howard
0 siblings, 1 reply; 8+ messages in thread
From: Lever, Charles @ 2004-09-09 18:54 UTC (permalink / raw)
To: Ara.T.Howard; +Cc: nfs
> > Yep. We forgot to add the stub to Linux 2.6.x. Please=20
> confirm that the=20
> > following patch fixes the problem for you.
>=20
> will fsync'ing a directory have any affect on the client=20
> inode cache for that dir? eg. will it invalidate that cache?
ara-
looking at the patch trond posted, it appears to add a "no-op" function
for fsyncing NFS directories. this means fsync against an NFS directory
will not complain, but otherwise does nothing.
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: sendmail "cannot fsync directory" after 2.4 -> 2.6
2004-09-09 18:54 Lever, Charles
@ 2004-09-09 20:36 ` Ara.T.Howard
0 siblings, 0 replies; 8+ messages in thread
From: Ara.T.Howard @ 2004-09-09 20:36 UTC (permalink / raw)
To: Lever, Charles; +Cc: nfs
On Thu, 9 Sep 2004, Lever, Charles wrote:
>>> Yep. We forgot to add the stub to Linux 2.6.x. Please
>> confirm that the
>>> following patch fixes the problem for you.
>>
>> will fsync'ing a directory have any affect on the client
>> inode cache for that dir? eg. will it invalidate that cache?
>
> ara-
>
> looking at the patch trond posted, it appears to add a "no-op" function
> for fsyncing NFS directories. this means fsync against an NFS directory
> will not complain, but otherwise does nothing.
yeah - i wasn't sure if that was for the client or server side. i'm am
concerned with invalidation ot the client side cache.
thanks for the clarification.
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it.
| --Dogen
===============================================================================
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-09-10 21:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09 6:15 sendmail "cannot fsync directory" after 2.4 -> 2.6 Frank Steiner
2004-09-09 10:39 ` Frank Steiner
2004-09-09 14:58 ` Trond Myklebust
2004-09-09 17:54 ` Ara.T.Howard
2004-09-09 18:25 ` Trond Myklebust
2004-09-10 7:33 ` Frank Steiner
-- strict thread matches above, loose matches on Subject: below --
2004-09-09 18:54 Lever, Charles
2004-09-09 20:36 ` Ara.T.Howard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.