[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081218223928.GA20092@atrey.karlin.mff.cuni.cz>
Date: Thu, 18 Dec 2008 23:39:28 +0100
From: Jan Kara <jack@...e.cz>
To: Rohit Sharma <imreckless@...il.com>
Cc: Kernelnewbies <kernelnewbies@...linux.org>,
ext4 <linux-ext4@...r.kernel.org>
Subject: Re: block allocation for ext2_mkdir
> On Fri, Dec 19, 2008 at 12:12 AM, Rohit Sharma <imreckless@...il.com> wrote:
> > How does ext2 allocate blocks for directory.
> >
> > ext2_mkdir calls ext2_make_empty
> >
> > ext2_make_empty calls __ext2_write_begin
> >
> > __ ext2_write_begin calls block_write_begin
> >
> > my query is that how does this function allocates blocks for directories. ??
> >
>
> Does ext2 uses ext2_get_block to allocate blocks for both files and
> directories. ??
Yes, exactly. Ext2 (unlike ext3 or ext4) treats directories the same
ways as ordinary files and thus ext2_get_block is used for block
allocation.
Honza
--
Jan Kara <jack@...e.cz>
SuSE CR Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists