All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: jenn sirp <sirpj@ecs.csus.edu>
Cc: reiserfs-list@namesys.com
Subject: Re: reiserfs_add_entry()
Date: Sun, 28 Mar 2004 00:35:14 -0500	[thread overview]
Message-ID: <40666412.7020107@suse.com> (raw)
In-Reply-To: <001501c41455$810487f0$4a28a5d1@energy>

-----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-----

      reply	other threads:[~2004-03-28  5:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-27 23:44 reiserfs_add_entry() jenn sirp
2004-03-28  5:35 ` Jeff Mahoney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40666412.7020107@suse.com \
    --to=jeffm@suse.com \
    --cc=reiserfs-list@namesys.com \
    --cc=sirpj@ecs.csus.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.