I was learning writing basic filesystem step by step -- till now what i wrote just mounts .
Now
can someone help me to clarify the difference between
1)blocksize we give when we do 'dd if=/dev/zero of=nnn bs=4096 count=10
ans: in my view -- just to define size of file 4096 *10
2)block size we give wen we do ./mkmyfs nnn 4096
ans while writing -- filesystem information -- to file -- this block size is used
3)block size we have as
#define
MYFS_DEFAULT_BS which we set as sb->s_blocksize-- in fill_super
function -- before doing sb_bread of disk super block
while mounting -- while reading filesystem info from the file-- this blocksize is used
4)in testfs --- sb_min_blocksize() was used --- before sb_bread in fill super --
wherein minimum of the two
'MYFS_DEFAULT_BS' and bdev_hardsect_size(sb->s_bdev)
is set as sb->s_blocksize
what is bdev_hardsect_size ??
what's d logic behind using minimum of these two Please CMIIW
--
Thanks & Regards
Nidhi Mittal Hada