[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAG4AFWb8XmmWra5qYBE8XxgxMYDqMMg8zzOXkHE03rGd_MBsCQ@mail.gmail.com>
Date: Wed, 17 Nov 2021 19:19:54 -0700
From: Jidong Xiao <jidong.xiao@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Subject: how and when to create the "." and ".." entry in Linux file systems?
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
Powered by blists - more mailing lists