* reiserfs_add_entry()
@ 2004-03-27 23:44 jenn sirp
2004-03-28 5:35 ` reiserfs_add_entry() Jeff Mahoney
0 siblings, 1 reply; 2+ messages in thread
From: jenn sirp @ 2004-03-27 23:44 UTC (permalink / raw)
To: reiserfs-list
Hello,
I was hoping this would be a fairly easy question for you guys to answer. I
have been altering the code in namei.c, the function: reiserfs_add_entry.
(version 3.6)Which apparently updates the directory entry. I have noticed
that when a file is written. This function is actually called four times. Is
this by reiser code or by the kernel?
A .swp is made, then a .swx, then the actual file, and another .swp. I am
curious as to what is going on here. Are these temporary buffers that are
related to the journal? -- Or is the kernel controlling this behavior?
Thanks,
Jenn
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: reiserfs_add_entry()
2004-03-27 23:44 reiserfs_add_entry() jenn sirp
@ 2004-03-28 5:35 ` Jeff Mahoney
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Mahoney @ 2004-03-28 5:35 UTC (permalink / raw)
To: jenn sirp; +Cc: reiserfs-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
jenn sirp wrote:
| Hello,
|
| I was hoping this would be a fairly easy question for you guys to
answer. I
| have been altering the code in namei.c, the function: reiserfs_add_entry.
| (version 3.6)Which apparently updates the directory entry. I have noticed
| that when a file is written. This function is actually called four
times. Is
| this by reiser code or by the kernel?
|
| A .swp is made, then a .swx, then the actual file, and another .swp. I am
| curious as to what is going on here. Are these temporary buffers that are
| related to the journal? -- Or is the kernel controlling this behavior?
Jenn -
reiserfs_add_entry() is called exactly once any time a filename is added
to a directory. It's only called by reiserfs_create, reiserfs_mkdir,
reiserfs_mknod, reiserfs_link, reiserfs_symlink, and reiserfs_rename.
All of these functions are called via the VFS layer to perform the
filesystem-specific portion of the similarly named syscalls, and again,
only once per syscall.
The sequence of filenames you're describing seems like what vim(1), or
perhaps another text editor, does during file saves. This happens
totally in userspace as part of the application. The kernel's only
involvement here is doing what it's told.
- -Jeff
- --
Jeff Mahoney
SuSE Labs
jeffm@suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAZmQSLPWxlyuTD7IRAsXMAJ9/gLg9HRMy9oh2+jAlyy7HfAgH9QCffCSB
OahGloK++DPCsL2kVb000q4=
=WcEd
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-28 5:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-27 23:44 reiserfs_add_entry() jenn sirp
2004-03-28 5:35 ` reiserfs_add_entry() Jeff Mahoney
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.