* [PATCH] tmpfs 2/4 mknod times
2002-06-12 2:51 [PATCH] tmpfs 1/4 symlink unwind Hugh Dickins
@ 2002-06-12 2:54 ` Hugh Dickins
0 siblings, 0 replies; 3+ messages in thread
From: Hugh Dickins @ 2002-06-12 2:54 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Alan Cox, Christoph Rohland, linux-kernel
shmem_mknod should not update directory times if it cannot get an inode.
--- 2.4.19-pre10/mm/shmem.c Tue Jun 11 19:02:30 2002
+++ linux/mm/shmem.c Tue Jun 11 19:02:30 2002
@@ -987,8 +987,8 @@
struct inode * inode = shmem_get_inode(dir->i_sb, mode, dev);
int error = -ENOSPC;
- dir->i_ctime = dir->i_mtime = CURRENT_TIME;
if (inode) {
+ dir->i_ctime = dir->i_mtime = CURRENT_TIME;
d_instantiate(dentry, inode);
dget(dentry); /* Extra count - pin the dentry in core */
error = 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tmpfs 2/4 mknod times
[not found] <Pine.LNX.4.21.0206120423200.1290-100000@localhost.localdomain>
@ 2002-06-12 3:31 ` Ryan Cumming
2002-06-12 15:26 ` Jan Harkes
0 siblings, 1 reply; 3+ messages in thread
From: Ryan Cumming @ 2002-06-12 3:31 UTC (permalink / raw)
To: Hugh Dickins; +Cc: linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On June 11, 2002 20:25, Hugh Dickins wrote:
> On Tue, 11 Jun 2002, Ryan Cumming wrote:
> > On June 11, 2002 19:54, Hugh Dickins wrote:
> > > + dir->i_ctime = dir->i_mtime = CURRENT_TIME;
> >
> > I'm probably misreading this, but why does shmem_mknod modify the
> > directory's ctime?
>
> Hmmm, good question. Perhaps I'll have dreamt up an answer by morning.
Well, lets see if the list has any ideas while you're sleeping.
- -Ryan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9BsCLLGMzRzbJfbQRAic3AJ9hh76od28Ic5OzB2PU8hLsV5vogACfbITB
8FyDd6i5BeMtk3xLzt1Y5ns=
=7+h9
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tmpfs 2/4 mknod times
2002-06-12 3:31 ` [PATCH] tmpfs 2/4 mknod times Ryan Cumming
@ 2002-06-12 15:26 ` Jan Harkes
0 siblings, 0 replies; 3+ messages in thread
From: Jan Harkes @ 2002-06-12 15:26 UTC (permalink / raw)
To: linux-kernel
On Tue, Jun 11, 2002 at 08:31:20PM -0700, Ryan Cumming wrote:
> On June 11, 2002 20:25, Hugh Dickins wrote:
> > On Tue, 11 Jun 2002, Ryan Cumming wrote:
> > > On June 11, 2002 19:54, Hugh Dickins wrote:
> > > > + dir->i_ctime = dir->i_mtime = CURRENT_TIME;
> > >
> > > I'm probably misreading this, but why does shmem_mknod modify the
> > > directory's ctime?
> >
> > Hmmm, good question. Perhaps I'll have dreamt up an answer by morning.
> Well, lets see if the list has any ideas while you're sleeping.
My guess would be that 'mtime' should be always updated because the
directory contents is changed (a new name is added). And 'ctime' has to
change whenever this new name cause a change in the size of the
directory because the i_size attribute has changed.
As tmpfs doesn't really have on-disk blocks for it's directories, every
create will change the directory size. (as well as every unlink).
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-12 15:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.21.0206120423200.1290-100000@localhost.localdomain>
2002-06-12 3:31 ` [PATCH] tmpfs 2/4 mknod times Ryan Cumming
2002-06-12 15:26 ` Jan Harkes
2002-06-12 2:51 [PATCH] tmpfs 1/4 symlink unwind Hugh Dickins
2002-06-12 2:54 ` [PATCH] tmpfs 2/4 mknod times Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox