[PATCH] 2.4.8-pre3 fsync entire path (+reiserfs fsync semantic change patch)

From: Chris Wedgwood (cw@f00f.org)
Date: Fri Aug 03 2001 - 17:01:43 EST


On Fri, Aug 03, 2001 at 06:34:14PM +0000, Linus Torvalds wrote:

            fsync(int fd)
            {
                    dentry = fdget(fd);
                    do_fsync(dentry);
                    for (;;) {
                            tmp = dentry;
                            dentry = dentry->d_parent;
                            if (dentry == tmp)
                                    break;
                            do_fdatasync(dentry);
                    }
            }

I really like this idea. Can people please try out the attached patch?

Please note, it contains a couple of things that need not be there in
the final version.

Note, there is also a reiserfs fix in here because we can call
f_op->fsync on a directory and without this fix it will BUG! Chris,
perhaps you can suggest a better fix?

Linus, one more thing --- the first argument to ->fsync is struct file*
and nothing uses it, I'd like to blow it away or would you prefer we
wait to 2.5.x as its essentially and API change and will break XFS,
JFS, etc.

   --cw



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 07 2001 - 21:00:29 EST