LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* What's in ocfs2.git
@ 2006-12-03 20:31 Mark Fasheh
2006-12-04 10:54 ` Steven Whitehouse
0 siblings, 1 reply; 15+ messages in thread
From: Mark Fasheh @ 2006-12-03 20:31 UTC (permalink / raw)
To: linux-kernel, ocfs2-devel
This e-mail describes the OCFS2 patches which I intend to push
upstream to Linus for 2.6.20.
* Various ocfs2 cleanups, including a patchset by me intended to clean up
some of the internal ocfs2 journal api. Mostly this revolves around
removing the ocfs2_journal_handle wrapper around handle_t. The immediate
benefits are better readability and a slightly smaller memory footprint
for open journal transactions.
* Configfs gets some small cleanups and some mutex annotations.
* Atime updates - thanks to Tiger Yang <tiger.yang@oracle.com>, ocfs2 now
writes to the inode atime field. This doesn't require any disk changes,
and is completely backwards compatible with older ocfs2 versions. An
inodes Atime is only updated if it hasn't changed within a certain
quantum. The user can define their own value at mount time, with 0
indicating that atime should always be updated. This is very similar to
the scheme implemented by gfs2. In the future, I'd like to see a "relative
atime" mode, which functions in the manner described by Valerie Henson at:
http://lkml.org/lkml/2006/8/25/380
* sys_splice - ocfs2 now has splice read and write support. Thanks again to
Tiger for the bulk of this functionality. Mostly we make use of the
generic_splice_read() and generic_file_splice_write_nolock() functions
provided already in fs/splice.c.
- There is one patch in the ocfs2 splice() series external to fs/ocfs2 - a
simple export of should_remove_suid(). This is done for code reuse
purposes. That particular patch can be seen at:
http://ftp.kernel.org/pub/linux/kernel/people/mfasheh/ocfs2/ocfs2_git_patches/ocfs2-upstream-linus-20061201/0025-Export-should_remove_suid.txt
I'll also attach it to this mail for review purposes.
* Last in the list of notable patches is a somewhat involved fix by Kurt
Hackel <kurt.hackel@oracle.com> within the ocfs2 dlm. We had temporarily
disable automatic migration of certain lock types because it was causing
us problems during stress testing. This patch fixes those problems and
re-enables migration. Overall this should reduce memory usage of the ocfs2
dlm.
The patches can be found in
git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git upstream-linus
Additionally, broken out patches are available at:
http://ftp.kernel.org/pub/linux/kernel/people/mfasheh/ocfs2/ocfs2_git_patches/ocfs2-upstream-linus-20060924/
Thanks,
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com
[PATCH] Export should_remove_suid()
This helps us avoid replicating the same logic within file system drivers.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
---
mm/filemap.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
d23a147bb6e8d467e8df73b6589888717da3b9ce
diff --git a/mm/filemap.c b/mm/filemap.c
index 7b84dc8..13df01c 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1893,6 +1893,7 @@ int should_remove_suid(struct dentry *de
return 0;
}
+EXPORT_SYMBOL(should_remove_suid);
int __remove_suid(struct dentry *dentry, int kill)
{
--
1.3.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: What's in ocfs2.git
2006-12-03 20:31 What's in ocfs2.git Mark Fasheh
@ 2006-12-04 10:54 ` Steven Whitehouse
2006-12-05 0:10 ` Mark Fasheh
0 siblings, 1 reply; 15+ messages in thread
From: Steven Whitehouse @ 2006-12-04 10:54 UTC (permalink / raw)
To: Valerie Henson, Mark Fasheh; +Cc: linux-kernel, ocfs2-devel
Hi,
On Sun, 2006-12-03 at 12:31 -0800, Mark Fasheh wrote:
> This e-mail describes the OCFS2 patches which I intend to push
> upstream to Linus for 2.6.20.
>
> * Atime updates - thanks to Tiger Yang <tiger.yang@oracle.com>, ocfs2 now
> writes to the inode atime field. This doesn't require any disk changes,
> and is completely backwards compatible with older ocfs2 versions. An
> inodes Atime is only updated if it hasn't changed within a certain
> quantum. The user can define their own value at mount time, with 0
> indicating that atime should always be updated. This is very similar to
> the scheme implemented by gfs2. In the future, I'd like to see a "relative
> atime" mode, which functions in the manner described by Valerie Henson at:
>
> http://lkml.org/lkml/2006/8/25/380
>
I'd like to second that. [adding Val Henson to the "to"] What (if
anything) remains to be done before the relative atime patch is ready to
go upstream? I'm happy to help out here if required,
Steve.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: What's in ocfs2.git
2006-12-04 10:54 ` Steven Whitehouse
@ 2006-12-05 0:10 ` Mark Fasheh
2006-12-05 0:36 ` Relative atime (was Re: What's in ocfs2.git) Valerie Henson
0 siblings, 1 reply; 15+ messages in thread
From: Mark Fasheh @ 2006-12-05 0:10 UTC (permalink / raw)
To: Steven Whitehouse; +Cc: Valerie Henson, linux-kernel, ocfs2-devel
Hi Steve,
On Mon, Dec 04, 2006 at 10:54:53AM +0000, Steven Whitehouse wrote:
> > In the future, I'd like to see a "relative atime" mode, which functions
> > in the manner described by Valerie Henson at:
> >
> > http://lkml.org/lkml/2006/8/25/380
> >
> I'd like to second that. [adding Val Henson to the "to"] What (if
> anything) remains to be done before the relative atime patch is ready to
> go upstream? I'm happy to help out here if required,
Last time I looked at them, things seemed to be in pretty good shape - it
wasn't a very large patch series.
The thing is (I'm going from memory here), gfs2 and ocfs2 are likely to just
make use of the option parsing (and setting of the MNT_RELATIME flag), and
ignore the changes to touch_atime() since we we handle our own atime
updates.
Overall I think it's a matter of pushing the patches to the kernel and to
mount(8). For ocfs2/gfs2 we implement a small amount of the logic in our
"lock and update atime" functions.
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Relative atime (was Re: What's in ocfs2.git)
2006-12-05 0:10 ` Mark Fasheh
@ 2006-12-05 0:36 ` Valerie Henson
2006-12-05 0:56 ` Valerie Henson
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Valerie Henson @ 2006-12-05 0:36 UTC (permalink / raw)
To: Mark Fasheh
Cc: Steven Whitehouse, linux-kernel, ocfs2-devel, linux-fsdevel, Al Viro
On Mon, Dec 04, 2006 at 04:10:07PM -0800, Mark Fasheh wrote:
> Hi Steve,
>
> On Mon, Dec 04, 2006 at 10:54:53AM +0000, Steven Whitehouse wrote:
> > > In the future, I'd like to see a "relative atime" mode, which functions
> > > in the manner described by Valerie Henson at:
> > >
> > > http://lkml.org/lkml/2006/8/25/380
> > >
> > I'd like to second that. [adding Val Henson to the "to"] What (if
> > anything) remains to be done before the relative atime patch is ready to
> > go upstream? I'm happy to help out here if required,
> Last time I looked at them, things seemed to be in pretty good shape - it
> wasn't a very large patch series.
Yep, the relative atime patch is tiny and pretty much done - just
needs some soak time in -mm and a little more review (cc'd Viro and
fsdevel). Kernel patch against 2.6.18-rc4 appended, patch to mount
following. (Note that my web server suffered a RAID failure and my
patches page is unavailable till the restore finishes.)
-VAL
Add "relatime" (relative atime) support. Relative atime only updates
the atime if the previous atime is older than the mtime or ctime.
Like noatime, but useful for applications like mutt that need to know
when a file has been read since it was last modified.
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
---
fs/inode.c | 11 ++++++++++-
fs/namespace.c | 5 ++++-
include/linux/fs.h | 1 +
include/linux/mount.h | 1 +
4 files changed, 16 insertions(+), 2 deletions(-)
--- linux-2.6.18-rc4-relatime.orig/fs/inode.c
+++ linux-2.6.18-rc4-relatime/fs/inode.c
@@ -1200,7 +1200,16 @@ void touch_atime(struct vfsmount *mnt, s
return;
now = current_fs_time(inode->i_sb);
- if (!timespec_equal(&inode->i_atime, &now)) {
+ if (timespec_equal(&inode->i_atime, &now))
+ return;
+ /*
+ * With relative atime, only update atime if the previous
+ * atime is earlier than either the ctime or mtime.
+ */
+ if (!mnt ||
+ !(mnt->mnt_flags & MNT_RELATIME) ||
+ (timespec_compare(&inode->i_atime, &inode->i_mtime) < 0) ||
+ (timespec_compare(&inode->i_atime, &inode->i_ctime) < 0)) {
inode->i_atime = now;
mark_inode_dirty_sync(inode);
}
--- linux-2.6.18-rc4-relatime.orig/fs/namespace.c
+++ linux-2.6.18-rc4-relatime/fs/namespace.c
@@ -376,6 +376,7 @@ static int show_vfsmnt(struct seq_file *
{ MNT_NOEXEC, ",noexec" },
{ MNT_NOATIME, ",noatime" },
{ MNT_NODIRATIME, ",nodiratime" },
+ { MNT_RELATIME, ",relatime" },
{ 0, NULL }
};
struct proc_fs_info *fs_infop;
@@ -1413,9 +1414,11 @@ long do_mount(char *dev_name, char *dir_
mnt_flags |= MNT_NOATIME;
if (flags & MS_NODIRATIME)
mnt_flags |= MNT_NODIRATIME;
+ if (flags & MS_RELATIME)
+ mnt_flags |= MNT_RELATIME;
flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
- MS_NOATIME | MS_NODIRATIME);
+ MS_NOATIME | MS_NODIRATIME | MS_RELATIME);
/* ... and get the mountpoint */
retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd);
--- linux-2.6.18-rc4-relatime.orig/include/linux/fs.h
+++ linux-2.6.18-rc4-relatime/include/linux/fs.h
@@ -119,6 +119,7 @@ extern int dir_notify_enable;
#define MS_PRIVATE (1<<18) /* change to private */
#define MS_SLAVE (1<<19) /* change to slave */
#define MS_SHARED (1<<20) /* change to shared */
+#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
#define MS_ACTIVE (1<<30)
#define MS_NOUSER (1<<31)
--- linux-2.6.18-rc4-relatime.orig/include/linux/mount.h
+++ linux-2.6.18-rc4-relatime/include/linux/mount.h
@@ -27,6 +27,7 @@ struct namespace;
#define MNT_NOEXEC 0x04
#define MNT_NOATIME 0x08
#define MNT_NODIRATIME 0x10
+#define MNT_RELATIME 0x20
#define MNT_SHRINKABLE 0x100
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-05 0:36 ` Relative atime (was Re: What's in ocfs2.git) Valerie Henson
@ 2006-12-05 0:56 ` Valerie Henson
2006-12-05 22:20 ` Mark Fasheh
2006-12-06 4:58 ` Andrew Morton
2 siblings, 0 replies; 15+ messages in thread
From: Valerie Henson @ 2006-12-05 0:56 UTC (permalink / raw)
To: Mark Fasheh
Cc: Steven Whitehouse, linux-kernel, ocfs2-devel, linux-fsdevel, Al Viro
On Mon, Dec 04, 2006 at 04:36:20PM -0800, Valerie Henson wrote:
> On Mon, Dec 04, 2006 at 04:10:07PM -0800, Mark Fasheh wrote:
> > Hi Steve,
> >
> > On Mon, Dec 04, 2006 at 10:54:53AM +0000, Steven Whitehouse wrote:
> > > > In the future, I'd like to see a "relative atime" mode, which functions
> > > > in the manner described by Valerie Henson at:
> > > >
> > > > http://lkml.org/lkml/2006/8/25/380
> > > >
> > > I'd like to second that. [adding Val Henson to the "to"] What (if
> > > anything) remains to be done before the relative atime patch is ready to
> > > go upstream? I'm happy to help out here if required,
> > Last time I looked at them, things seemed to be in pretty good shape - it
> > wasn't a very large patch series.
And the userland part.
-VAL
Add the "relatime" (relative atime) option support to mount. Relative
atime only updates the atime if the previous atime is older than the
mtime or ctime. Like noatime, but useful for applications like mutt
that need to know when a file has been read since it was last
modified.
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
---
mount/mount.8 | 7 +++++++
mount/mount.c | 6 ++++++
mount/mount_constants.h | 4 ++++
3 files changed, 17 insertions(+)
--- util-linux-2.13-pre7.orig/mount/mount.8
+++ util-linux-2.13-pre7/mount/mount.8
@@ -586,6 +586,13 @@ access on the news spool to speed up new
.B nodiratime
Do not update directory inode access times on this filesystem.
.TP
+.B relatime
+Update inode access times relative to modify or change time. Access
+time is only updated if the previous access time was earlier than the
+current modify or change time. (Similar to noatime, but doesn't break
+mutt or other applications that need to know if a file has been read
+since the last time it was modified.)
+.TP
.B noauto
Can only be mounted explicitly (i.e., the
.B \-a
--- util-linux-2.13-pre7.orig/mount/mount.c
+++ util-linux-2.13-pre7/mount/mount.c
@@ -164,6 +164,12 @@ static const struct opt_map opt_map[] =
{ "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
{ "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
#endif
+#ifdef MS_RELATIME
+ { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to
+ mtime/ctime */
+ { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
+ to mtime/ctime */
+#endif
{ NULL, 0, 0, 0 }
};
--- util-linux-2.13-pre7.orig/mount/mount_constants.h
+++ util-linux-2.13-pre7/mount/mount_constants.h
@@ -57,6 +57,10 @@ if we have a stack or plain mount - moun
#ifndef MS_VERBOSE
#define MS_VERBOSE 0x8000 /* 32768 */
#endif
+#ifndef MS_RELATIME
+#define MS_RELATIME 0x200000 /* 200000: Update access times relative
+ to mtime/ctime */
+#endif
/*
* Magic mount flag number. Had to be or-ed to the flag values.
*/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-05 0:36 ` Relative atime (was Re: What's in ocfs2.git) Valerie Henson
2006-12-05 0:56 ` Valerie Henson
@ 2006-12-05 22:20 ` Mark Fasheh
2006-12-06 6:11 ` Andrew Morton
2006-12-06 4:58 ` Andrew Morton
2 siblings, 1 reply; 15+ messages in thread
From: Mark Fasheh @ 2006-12-05 22:20 UTC (permalink / raw)
To: Valerie Henson
Cc: Steven Whitehouse, linux-kernel, ocfs2-devel, linux-fsdevel, Al Viro
On Mon, Dec 04, 2006 at 04:36:20PM -0800, Valerie Henson wrote:
> > Last time I looked at them, things seemed to be in pretty good shape - it
> > wasn't a very large patch series.
>
> Yep, the relative atime patch is tiny and pretty much done - just
> needs some soak time in -mm and a little more review (cc'd Viro and
> fsdevel). Kernel patch against 2.6.18-rc4 appended, patch to mount
> following. (Note that my web server suffered a RAID failure and my
> patches page is unavailable till the restore finishes.)
Well, here's what the ocfs2 patch would look like. If we care to push this
forward, some time in -mm would be nice...
--Mark
From: Mark Fasheh <mark.fasheh@oracle.com>
Date: Tue, 5 Dec 2006 14:13:41 -0800
Subject: [PATCH] ocfs2: relative atime support
Update ocfs2_should_update_atime() to understand the MNT_RELATIME flag and
to test against mtime / ctime accordingly.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
---
fs/ocfs2/file.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 8786b3c..16a9b5e 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -154,6 +154,15 @@ int ocfs2_should_update_atime(struct ino
return 0;
now = CURRENT_TIME;
+
+ if (vfsmnt->mnt_flags & MNT_RELATIME) {
+ if ((timespec_compare(&inode->i_atime, &inode->i_mtime) < 0) ||
+ (timespec_compare(&inode->i_atime, &inode->i_ctime) < 0))
+ return 1;
+
+ return 0;
+ }
+
if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum))
return 0;
else
--
1.4.2.4
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-05 22:20 ` Mark Fasheh
@ 2006-12-06 6:11 ` Andrew Morton
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Morton @ 2006-12-06 6:11 UTC (permalink / raw)
To: Mark Fasheh
Cc: Valerie Henson, Steven Whitehouse, linux-kernel, ocfs2-devel,
linux-fsdevel, Al Viro
On Tue, 5 Dec 2006 14:20:27 -0800
Mark Fasheh <mark.fasheh@oracle.com> wrote:
> Update ocfs2_should_update_atime() to understand the MNT_RELATIME flag and
> to test against mtime / ctime accordingly.
>
> ...
>
> --- a/fs/ocfs2/file.c
> +++ b/fs/ocfs2/file.c
> @@ -154,6 +154,15 @@ int ocfs2_should_update_atime(struct ino
> return 0;
>
> now = CURRENT_TIME;
> +
> + if (vfsmnt->mnt_flags & MNT_RELATIME) {
> + if ((timespec_compare(&inode->i_atime, &inode->i_mtime) < 0) ||
> + (timespec_compare(&inode->i_atime, &inode->i_ctime) < 0))
> + return 1;
> +
> + return 0;
So if atime == mtime == ctime, we don't update the atime.
I think we should. It seems risky to leave them all equal.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-05 0:36 ` Relative atime (was Re: What's in ocfs2.git) Valerie Henson
2006-12-05 0:56 ` Valerie Henson
2006-12-05 22:20 ` Mark Fasheh
@ 2006-12-06 4:58 ` Andrew Morton
2006-12-06 8:58 ` Valerie Henson
` (2 more replies)
2 siblings, 3 replies; 15+ messages in thread
From: Andrew Morton @ 2006-12-06 4:58 UTC (permalink / raw)
To: Valerie Henson
Cc: mark.fasheh, steve, linux-kernel, ocfs2-devel, linux-fsdevel, viro
> On Mon, 4 Dec 2006 16:36:20 -0800 Valerie Henson <val_henson@linux.intel.com> wrote:
> Add "relatime" (relative atime) support. Relative atime only updates
> the atime if the previous atime is older than the mtime or ctime.
> Like noatime, but useful for applications like mutt that need to know
> when a file has been read since it was last modified.
That seems like a good idea.
I found touch_atime() to be rather putrid, so I hacked it around a bit. The
end result:
void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
{
struct inode *inode = dentry->d_inode;
struct timespec now;
if (IS_RDONLY(inode))
return;
if (inode->i_flags & S_NOATIME)
return;
if (inode->i_sb->s_flags & MS_NOATIME)
return;
if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
return;
/*
* We may have a NULL vfsmount when coming from NFSD
*/
if (mnt) {
if (mnt->mnt_flags & MNT_NOATIME)
return;
if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
return;
if (mnt->mnt_flags & MNT_RELATIME) {
/*
* With relative atime, only update atime if the
* previous atime is earlier than either the ctime or
* mtime.
*/
if (timespec_compare(&inode->i_mtime,
&inode->i_atime) < 0 &&
timespec_compare(&inode->i_ctime,
&inode->i_atime) < 0)
return;
}
}
now = current_fs_time(inode->i_sb);
if (timespec_equal(&inode->i_atime, &now))
return;
inode->i_atime = now;
mark_inode_dirty_sync(inode);
}
Does it still look right?
Note the reordering to avoid the current_fs_time() call if poss.
That's the easy part. How are we going to get mount(8) patched?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-06 4:58 ` Andrew Morton
@ 2006-12-06 8:58 ` Valerie Henson
2006-12-06 9:42 ` Eric Dumazet
2006-12-09 3:15 ` Valerie Henson
2 siblings, 0 replies; 15+ messages in thread
From: Valerie Henson @ 2006-12-06 8:58 UTC (permalink / raw)
To: Andrew Morton
Cc: mark.fasheh, steve, linux-kernel, ocfs2-devel, linux-fsdevel, viro
On Tue, Dec 05, 2006 at 08:58:02PM -0800, Andrew Morton wrote:
> > On Mon, 4 Dec 2006 16:36:20 -0800 Valerie Henson <val_henson@linux.intel.com> wrote:
> > Add "relatime" (relative atime) support. Relative atime only updates
> > the atime if the previous atime is older than the mtime or ctime.
> > Like noatime, but useful for applications like mutt that need to know
> > when a file has been read since it was last modified.
>
> That seems like a good idea.
>
> I found touch_atime() to be rather putrid, so I hacked it around a bit. The
> end result:
I like that rather better - add my:
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
> That's the easy part. How are we going to get mount(8) patched?
Well, the nodiratime documentation got in. (I was going to add that as
part of this apatch, but lo and behold.)
-VAL
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-06 4:58 ` Andrew Morton
2006-12-06 8:58 ` Valerie Henson
@ 2006-12-06 9:42 ` Eric Dumazet
2006-12-06 12:48 ` Arjan van de Ven
2006-12-09 3:15 ` Valerie Henson
2 siblings, 1 reply; 15+ messages in thread
From: Eric Dumazet @ 2006-12-06 9:42 UTC (permalink / raw)
To: Andrew Morton
Cc: Valerie Henson, mark.fasheh, steve, linux-kernel, ocfs2-devel,
linux-fsdevel, viro
On Wednesday 06 December 2006 05:58, Andrew Morton wrote:
> > On Mon, 4 Dec 2006 16:36:20 -0800 Valerie Henson
> > <val_henson@linux.intel.com> wrote: Add "relatime" (relative atime)
> > support. Relative atime only updates the atime if the previous atime is
> > older than the mtime or ctime. Like noatime, but useful for applications
> > like mutt that need to know when a file has been read since it was last
> > modified.
>
> That seems like a good idea.
>
> I found touch_atime() to be rather putrid, so I hacked it around a bit.
I find this function full of tests...
> The end result:
>
> void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
> {
> struct inode *inode = dentry->d_inode;
> struct timespec now;
>
> if (IS_RDONLY(inode))
> return;
While we are adding new tests, we could try to be smart here testing both
MS_RDONLY and MS_NOATIME.
if (__IS_FLG(inode, MS_RDONLY | MS_NOATIME))
return;
> if (inode->i_flags & S_NOATIME)
> return;
> if (inode->i_sb->s_flags & MS_NOATIME)
> return;
So that that one can be deleted.
> if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
> return;
if (__IS_FLG(inode, MS_NODIRATIME) && S_ISDIR(inode->i_mode))
return;
Eric
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-06 9:42 ` Eric Dumazet
@ 2006-12-06 12:48 ` Arjan van de Ven
0 siblings, 0 replies; 15+ messages in thread
From: Arjan van de Ven @ 2006-12-06 12:48 UTC (permalink / raw)
To: Eric Dumazet
Cc: Andrew Morton, Valerie Henson, mark.fasheh, steve, linux-kernel,
ocfs2-devel, linux-fsdevel, viro
>
> > if (inode->i_sb->s_flags & MS_NOATIME)
> > return;
> So that that one can be deleted.
Hi,
I would mostly expect the compiler to be relatively smart about this and
group a bunch of these tests together... so I rather see readable code
than optimized code for something the compiler should be doing for us ;)
Greetings,
Arjan van de Ven
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-06 4:58 ` Andrew Morton
2006-12-06 8:58 ` Valerie Henson
2006-12-06 9:42 ` Eric Dumazet
@ 2006-12-09 3:15 ` Valerie Henson
2006-12-12 9:30 ` Karel Zak
2 siblings, 1 reply; 15+ messages in thread
From: Valerie Henson @ 2006-12-09 3:15 UTC (permalink / raw)
To: Andrew Morton
Cc: mark.fasheh, steve, linux-kernel, ocfs2-devel, linux-fsdevel,
viro, Karel Zak
On Tue, Dec 05, 2006 at 08:58:02PM -0800, Andrew Morton wrote:
> That's the easy part. How are we going to get mount(8) patched?
Karel, interested in taking a look at the following patch? The kernel
bits are in -mm currently.
-VAL
Add the "relatime" (relative atime) option support to mount. Relative
atime only updates the atime if the previous atime is older than the
mtime or ctime. Like noatime, but useful for applications like mutt
that need to know when a file has been read since it was last
modified.
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karel Zak <kzak@redhat.com>
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
---
mount/mount.8 | 7 +++++++
mount/mount.c | 6 ++++++
mount/mount_constants.h | 4 ++++
3 files changed, 17 insertions(+)
--- util-linux-2.13-pre7.orig/mount/mount.8
+++ util-linux-2.13-pre7/mount/mount.8
@@ -586,6 +586,13 @@ access on the news spool to speed up new
.B nodiratime
Do not update directory inode access times on this filesystem.
.TP
+.B relatime
+Update inode access times relative to modify or change time. Access
+time is only updated if the previous access time was earlier than the
+current modify or change time. (Similar to noatime, but doesn't break
+mutt or other applications that need to know if a file has been read
+since the last time it was modified.)
+.TP
.B noauto
Can only be mounted explicitly (i.e., the
.B \-a
--- util-linux-2.13-pre7.orig/mount/mount.c
+++ util-linux-2.13-pre7/mount/mount.c
@@ -164,6 +164,12 @@ static const struct opt_map opt_map[] =
{ "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
{ "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
#endif
+#ifdef MS_RELATIME
+ { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to
+ mtime/ctime */
+ { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
+ to mtime/ctime */
+#endif
{ NULL, 0, 0, 0 }
};
--- util-linux-2.13-pre7.orig/mount/mount_constants.h
+++ util-linux-2.13-pre7/mount/mount_constants.h
@@ -57,6 +57,10 @@ if we have a stack or plain mount - moun
#ifndef MS_VERBOSE
#define MS_VERBOSE 0x8000 /* 32768 */
#endif
+#ifndef MS_RELATIME
+#define MS_RELATIME 0x200000 /* 200000: Update access times relative
+ to mtime/ctime */
+#endif
/*
* Magic mount flag number. Had to be or-ed to the flag values.
*/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Relative atime (was Re: What's in ocfs2.git)
2006-12-09 3:15 ` Valerie Henson
@ 2006-12-12 9:30 ` Karel Zak
0 siblings, 0 replies; 15+ messages in thread
From: Karel Zak @ 2006-12-12 9:30 UTC (permalink / raw)
To: Valerie Henson
Cc: Andrew Morton, mark.fasheh, steve, linux-kernel, ocfs2-devel,
linux-fsdevel, viro
On Fri, Dec 08, 2006 at 07:15:14PM -0800, Valerie Henson wrote:
> On Tue, Dec 05, 2006 at 08:58:02PM -0800, Andrew Morton wrote:
> > That's the easy part. How are we going to get mount(8) patched?
>
> Karel, interested in taking a look at the following patch? The kernel
> bits are in -mm currently.
The patch looks good. I'll add it to my development util-linux tree.
Thanks.
Karel
> Add the "relatime" (relative atime) option support to mount. Relative
> atime only updates the atime if the previous atime is older than the
> mtime or ctime. Like noatime, but useful for applications like mutt
> that need to know when a file has been read since it was last
> modified.
>
> Cc: Adrian Bunk <bunk@stusta.de>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Karel Zak <kzak@redhat.com>
>
> Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
>
> ---
> mount/mount.8 | 7 +++++++
> mount/mount.c | 6 ++++++
> mount/mount_constants.h | 4 ++++
> 3 files changed, 17 insertions(+)
>
> --- util-linux-2.13-pre7.orig/mount/mount.8
> +++ util-linux-2.13-pre7/mount/mount.8
> @@ -586,6 +586,13 @@ access on the news spool to speed up new
> .B nodiratime
> Do not update directory inode access times on this filesystem.
> .TP
> +.B relatime
> +Update inode access times relative to modify or change time. Access
> +time is only updated if the previous access time was earlier than the
> +current modify or change time. (Similar to noatime, but doesn't break
> +mutt or other applications that need to know if a file has been read
> +since the last time it was modified.)
> +.TP
> .B noauto
> Can only be mounted explicitly (i.e., the
> .B \-a
> --- util-linux-2.13-pre7.orig/mount/mount.c
> +++ util-linux-2.13-pre7/mount/mount.c
> @@ -164,6 +164,12 @@ static const struct opt_map opt_map[] =
> { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
> { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
> #endif
> +#ifdef MS_RELATIME
> + { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to
> + mtime/ctime */
> + { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
> + to mtime/ctime */
> +#endif
> { NULL, 0, 0, 0 }
> };
>
> --- util-linux-2.13-pre7.orig/mount/mount_constants.h
> +++ util-linux-2.13-pre7/mount/mount_constants.h
> @@ -57,6 +57,10 @@ if we have a stack or plain mount - moun
> #ifndef MS_VERBOSE
> #define MS_VERBOSE 0x8000 /* 32768 */
> #endif
> +#ifndef MS_RELATIME
> +#define MS_RELATIME 0x200000 /* 200000: Update access times relative
> + to mtime/ctime */
> +#endif
> /*
> * Magic mount flag number. Had to be or-ed to the flag values.
> */
> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Karel Zak <kzak@redhat.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* What's in ocfs2.git
@ 2009-09-08 20:23 Joel Becker
0 siblings, 0 replies; 15+ messages in thread
From: Joel Becker @ 2009-09-08 20:23 UTC (permalink / raw)
To: ocfs2-devel, linux-kernel, Linux Filesystem Mailing List
Hey everyone,
ocfs2.git currently has 85 patches queued for the 2.6.32 merge
window, and that will probably grow to over 100. So I wanted to fire
off a heads up for anyone who wants to re-review what is in there.
The big feature item is the reflinkat(2) system call.
reflink(2) was discussed at the filesystem workshop this spring, and the
patch went through various stages of review in May before a final patch
was settled on. This patch is included here now that ocfs2 provides
support for reflinks.
All of these patches have been reviewed on the appropriate
mailing lists, some more than once. So I've decided not to carpet-bomb
with patches. The git locations are included for those wishing to view
the patches.
There are two major hunks of the current queued patches. The
first hunk separates the ocfs2_caching_info structure from ocfs2's
inodes. We use the caching info to keep track of a metadata buffer's
up2date status in a cluster aware fashion. Up until now, each buffer
was owned by a single inode, so the cache was tied to inodes. But now
we need a caching info tied to a non-inode structure that is shared by
many inodes (the refcount tree, see below for more on that). So we make
it a first-class structure and rework our up2date and journal code to
rely on it.
Then there is the patch for the reflinkat(2) system call.
The second major hunk is the implementation of "refcount trees",
the data structure ocfs2 uses to handle reflinks. Refcount trees allow
for ocfs2 inodes to share data extents in a copy-on-write fashion.
We've been testing the heck out of them, and they're ready to go.
To look at what's currently prepped for the merge window:
[View]
http://git.kernel.org/?p=linux/kernel/git/jlbec/ocfs2.git;a=shortlog;h=merge-window
[Pull]
git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git merge-window
The remaining work I have is a cleanup of ocfs2's extended
attribute setter code. It unifies the code paths for the various ways
ocfs2 stores xattrs. The current patches have been reviewed on the
mailing list, but I'm still chasing at least one bug. As such, they're
not in the merge-window branch but are still living on their own xa_loc
branch. If we get the bugs nailed down before the merge window is over,
we'll be going upstream this cycle.
To look at the extended attribute cleanups:
[View]
http://git.kernel.org/?p=linux/kernel/git/jlbec/ocfs2.git;a=shortlog;h=xa_loc
[Pull]
git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git xa_loc
Joel
[Merge window shortlog]
Coly Li (1):
dlmglue.c: add missed mlog lines
Joel Becker (41):
ocfs2: Make the ocfs2_caching_info structure self-contained.
ocfs2: Change metadata caching locks to an operations structure.
ocfs2: Take the inode out of the metadata read/write paths.
ocfs2: move ip_last_trans to struct ocfs2_caching_info
ocfs2: move ip_created_trans to struct ocfs2_caching_info
ocfs2: Pass struct ocfs2_caching_info to the journal functions.
ocfs2: Store the ocfs2_caching_info on ocfs2_extent_tree.
ocfs2: Pass ocfs2_caching_info to ocfs2_read_extent_block().
ocfs2: ocfs2_find_path() only needs the caching info
ocfs2: ocfs2_create_new_meta_bhs() doesn't need struct inode.
ocfs2: Pass ocfs2_extent_tree to ocfs2_unlink_path()
ocfs2: ocfs2_complete_edge_insert() doesn't need struct inode at all.
ocfs2: Get inode out of ocfs2_rotate_subtree_root_right().
ocfs2: Pass ocfs2_extent_tree to ocfs2_get_subtree_root()
ocfs2: Drop struct inode from ocfs2_extent_tree_operations.
ocfs2: ocfs2_rotate_tree_right() doesn't need struct inode.
ocfs2: ocfs2_update_edge_lengths() doesn't need struct inode.
ocfs2: ocfs2_rotate_subtree_left() doesn't need struct inode.
ocfs2: __ocfs2_rotate_tree_left() doesn't need struct inode.
ocfs2: ocfs2_rotate_tree_left() no longer needs struct inode.
ocfs2: ocfs2_merge_rec_left/right() no longer need struct inode.
ocfs2: ocfs2_try_to_merge_extent() doesn't need struct inode.
ocfs2: ocfs2_grow_branch() and ocfs2_append_rec_to_path() lose struct inode.
ocfs2: ocfs2_truncate_rec() doesn't need struct inode.
ocfs2: Make truncating the extent map an extent_tree_operation.
ocfs2: ocfs2_insert_at_leaf() doesn't need struct inode.
ocfs2: Give ocfs2_split_record() an extent_tree instead of an inode.
ocfs2: ocfs2_do_insert_extent() and ocfs2_insert_path() no longer need an inode.
ocfs2: ocfs2_extent_contig() only requires the superblock.
ocfs2: Swap inode for extent_tree in ocfs2_figure_merge_contig_type().
ocfs2: Remove inode from ocfs2_figure_extent_contig().
ocfs2: ocfs2_figure_insert_type() no longer needs struct inode.
ocfs2: Make extent map insertion an extent_tree_operation.
ocfs2: ocfs2_insert_extent() no longer needs struct inode.
ocfs2: ocfs2_add_clusters_in_btree() no longer needs struct inode.
ocfs2: ocfs2_remove_extent() no longer needs struct inode.
ocfs2: ocfs2_split_and_insert() no longer needs struct inode.
ocfs2: Teach ocfs2_replace_extent_rec() to use an extent_tree.
ocfs2: __ocfs2_mark_extent_written() doesn't need struct inode.
ocfs2: Pass ocfs2_caching_info into ocfs_init_*_extent_tree().
fs: Add the reflink() operation and reflinkat(2) system call.
Sunil Mushran (1):
ocfs2: __ocfs2_abort() should not enable panic for local mounts
Tao Ma (41):
ocfs2: Define refcount tree structure.
ocfs2: Add metaecc for ocfs2_refcount_block.
ocfs2: Add ocfs2_read_refcount_block.
ocfs2: Abstract caching info checkpoint.
ocfs2: Add new refcount tree lock resource in dlmglue.
ocfs2: Add caching info for refcount tree.
ocfs2: Add refcount tree lock mechanism.
ocfs2: Basic tree root operation.
ocfs2: Wrap ocfs2_extent_contig in ocfs2_extent_tree.
ocfs2: Abstract extent split process.
ocfs2: Add refcount b-tree as a new extent tree.
ocfs2: move tree path functions to alloc.h.
ocfs2: Add support for incrementing refcount in the tree.
ocfs2: Add support of decrementing refcount for delete.
ocfs2: Add functions for extents refcounted.
ocfs2: Decrement refcount when truncating refcounted extents.
ocfs2: Add CoW support.
ocfs2: CoW refcount tree improvement.
ocfs2: Integrate CoW in file write.
ocfs2: CoW a reflinked cluster when it is truncated.
ocfs2: Add normal functions for reflink a normal file's extents.
ocfs2: handle file attributes issue for reflink.
ocfs2: Return extent flags for xattr value tree.
ocfs2: Abstract duplicate clusters process in CoW.
ocfs2: Add CoW support for xattr.
ocfs2: Remove inode from ocfs2_xattr_bucket_get_name_value.
ocfs2: Abstract the creation of xattr block.
ocfs2: Abstract ocfs2 xattr tree extend rec iteration process.
ocfs2: Attach xattr clusters to refcount tree.
ocfs2: Call refcount tree remove process properly.
ocfs2: Create an xattr indexed block if needed.
ocfs2: Add reflink support for xattr.
ocfs2: Modify removing xattr process for refcount.
ocfs2: Don't merge in 1st refcount ops of reflink.
ocfs2: Make transaction extend more efficient.
ocfs2: Use proper parameter for some inode operation.
ocfs2: Create reflinked file in orphan dir.
ocfs2: Add preserve to reflink.
ocfs2: Implement ocfs2_reflink.
ocfs2: Enable refcount tree support.
ocfs2: Add ioctl for reflink.
Wengang Wang (1):
ocfs2: add spinlock protection when dealing with lockres->purge.
[Extended attribute cleanup shortlog]
Joel Becker (16):
ocfs2: Introduce ocfs2_xa_loc
ocfs2: Remove xattrs via ocfs2_xa_loc
ocfs2: Prefix the member fields of struct ocfs2_xattr_info.
ocfs2: Add a name_len field to ocfs2_xattr_info.
ocfs2: Wrap calculation of name+value pair size.
ocfs2: Set the xattr name+value pair in one place
ocfs2: Handle value tree roots in ocfs2_xa_set_inline_value()
ocfs2: Provide ocfs2_xa_fill_value_buf() for external value processing
ocfs2: Teach ocfs2_xa_loc how to do its own journal work
ocfs2: Allocation in ocfs2_xa_prepare_entry(), values in ocfs2_xa_store_value()
ocfs2: Gell into ocfs2_xa_set()
ocfs2: Let ocfs2_xa_prepare_entry() do space checks.
ocfs2: Set xattr block entries with ocfs2_xa_set()
ocfs2: Set inline xattr entries with ocfs2_xa_set()
ocfs2: Handle errors while setting external xattr values.
ocfs2: Never call ocfs2_xa_fill_value_buf() for inline values.
--
"I inject pure kryptonite into my brain.
It improves my kung fu, and it eases the pain."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 15+ messages in thread
* What's in ocfs2.git
@ 2006-09-13 21:35 Mark Fasheh
0 siblings, 0 replies; 15+ messages in thread
From: Mark Fasheh @ 2006-09-13 21:35 UTC (permalink / raw)
To: linux-kernel; +Cc: ocfs2-devel
The following describes the contents of the ALL branch of
git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2.git
* The usual set of cleanups and fixes.
- a #include cleanup
- some nlink check fixes
- a heartbeat sector math fix
* OCFS2 now supports ext2 file attributes. Thanks to Herbert Poetzl for that
feature.
* Shared writeable mmap support. This just make use of the ->page_mkwrite()
callback to take write locks on pages. It works quite well, though there's
one unresolved issue I'd like to work out first.
* Fix mtime updates on buffered writes so that they always happen.
* An old directory readahead patch which I had never pushed upstream. IMHO,
it's actually more interesting in that it provides the code to do readahead
of other fs structures in the future.
* A patch series which removes the "dentry" vote, in favor of a locking
scheme which achieves the same thing (cluster-wide dentry delete on
unlink/rename) using fewer network messages in the average case. This
series also includes two interesting changes:
- An OCFS2 DLM API update, needed to get this going.
- A small patch to the VFS to enable a file system to manually d_move()
during rename. This also updates NFS for the behavior.
* A configfs fix - it was previously possible to create duplicate subsystem
names.
Most of this will be queued up for 2.6.19. Diffstat and shortlog are below.
Broken out patches can be found at:
http://www.kernel.org/pub/linux/kernel/people/mfasheh/ocfs2/ocfs2_git_patches/ocfs2-all-20060913/
--Mark
fs/configfs/dir.c | 32 ++
fs/namei.c | 6
fs/nfs/dir.c | 3
fs/nfs/super.c | 10
fs/ocfs2/Makefile | 1
fs/ocfs2/alloc.c | 28 +-
fs/ocfs2/aops.c | 83 ++----
fs/ocfs2/buffer_head_io.c | 95 +++++--
fs/ocfs2/buffer_head_io.h | 2
fs/ocfs2/cluster/heartbeat.c | 8
fs/ocfs2/cluster/tcp_internal.h | 5
fs/ocfs2/dcache.c | 380 +++++++++++++++++++++++++++++-
fs/ocfs2/dcache.h | 27 ++
fs/ocfs2/dir.c | 28 +-
fs/ocfs2/dlm/dlmapi.h | 1
fs/ocfs2/dlm/dlmast.c | 6
fs/ocfs2/dlm/dlmcommon.h | 1
fs/ocfs2/dlm/dlmlock.c | 10
fs/ocfs2/dlm/dlmmaster.c | 4
fs/ocfs2/dlm/dlmrecovery.c | 3
fs/ocfs2/dlm/userdlm.c | 81 ++----
fs/ocfs2/dlm/userdlm.h | 1
fs/ocfs2/dlmglue.c | 497 +++++++++++++++++++++++++++++++---------
fs/ocfs2/dlmglue.h | 16 +
fs/ocfs2/export.c | 4
fs/ocfs2/file.c | 3
fs/ocfs2/inode.c | 42 ++-
fs/ocfs2/inode.h | 3
fs/ocfs2/ioctl.c | 136 ++++++++++
fs/ocfs2/ioctl.h | 16 +
fs/ocfs2/mmap.c | 100 ++++++--
fs/ocfs2/namei.c | 148 +++++++----
fs/ocfs2/ocfs2_fs.h | 24 +
fs/ocfs2/ocfs2_lockid.h | 25 ++
fs/ocfs2/super.c | 2
fs/ocfs2/sysfile.c | 4
fs/ocfs2/uptodate.c | 21 +
fs/ocfs2/uptodate.h | 2
fs/ocfs2/vote.c | 180 --------------
fs/ocfs2/vote.h | 5
include/linux/fs.h | 7
41 files changed, 1479 insertions(+), 571 deletions(-)
Adrian Bunk:
fs/ocfs2/ioctl.c should #include "ioctl.h"
Herbert Poetzl:
ocfs2: add ext2 attributes
Joel Becker:
configfs: Prevent duplicate subsystem names.
Mark Fasheh:
ocfs2: implement directory read-ahead
ocfs2: Shared writeable mmap
ocfs2: properly update i_mtime on buffered write
ocfs2: move nlink check in ocfs2_mknod()
ocfs2: Remove overzealous BUG_ON()
ocfs2: Silence dlm error print
ocfs2: Allow binary names in the DLM
ocfs2: Update dlmfs for new dlmlock() API
ocfs2: Update dlmglue for new dlmlock() API
ocfs2: Add new cluster lock type
ocfs2: Add dentry tracking API
ocfs2: Hook rest of the file system into dentry locking API
ocfs2: Remove the dentry vote
Allow file systems to manually d_move() inside of ->rename()
ocfs2: manually d_move() during ocfs2_rename()
Mathieu Avila:
ocfs2: Fix heartbeat sector calculation
Tiger Yang:
ocfs2: Fix directory link count checks in ocfs2_link()
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-09-08 20:26 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-03 20:31 What's in ocfs2.git Mark Fasheh
2006-12-04 10:54 ` Steven Whitehouse
2006-12-05 0:10 ` Mark Fasheh
2006-12-05 0:36 ` Relative atime (was Re: What's in ocfs2.git) Valerie Henson
2006-12-05 0:56 ` Valerie Henson
2006-12-05 22:20 ` Mark Fasheh
2006-12-06 6:11 ` Andrew Morton
2006-12-06 4:58 ` Andrew Morton
2006-12-06 8:58 ` Valerie Henson
2006-12-06 9:42 ` Eric Dumazet
2006-12-06 12:48 ` Arjan van de Ven
2006-12-09 3:15 ` Valerie Henson
2006-12-12 9:30 ` Karel Zak
-- strict thread matches above, loose matches on Subject: below --
2009-09-08 20:23 What's in ocfs2.git Joel Becker
2006-09-13 21:35 Mark Fasheh
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).