linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how and when to create the "." and ".." entry in Linux file systems?
@ 2021-11-18  2:19 Jidong Xiao
  0 siblings, 0 replies; only message in thread
From: Jidong Xiao @ 2021-11-18  2:19 UTC (permalink / raw)
  To: LKML

Hello,

I'm trying to learn how to implement a very simple file system in a
Linux system. I started with registering the file system, allocating
and initializing the superblock, and allocating the root inode of this
file system. Now after mount, I can "cd" into my file system root
directory - the directory where this file system is mounted.

Now my next goal is, in the root directory, if I run "ls -a", I should
see "." and "..". I think this behavior should be common among all
file systems,  thus in my file system code, I likely don't need to do
anything fancy, but maybe just call some VFS function? If so, call
which function? Are these two entries (. and ..) supposed to be
created when the file system is mounted or later - like not created
until I run "ls -a"?

Thank you.

-Jidong

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-18  2:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18  2:19 how and when to create the "." and ".." entry in Linux file systems? Jidong Xiao

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