how to create file without using extent allocation

Vlad Dogaru ddvlad at rosedu.org
Thu Mar 22 09:42:07 EDT 2012


On Thu, Mar 22, 2012 at 3:31 PM, Akshay Nehe <akshaynehe785 at gmail.com> wrote:
> Hello,
>
> Can we create file on ext4 file system which dose not uses extent allocation?

Man page of mkfs.ext4 suggests using "-O ^feature" to disable an ext4
feature.  This seems to work:

$ dd if=/dev/zero of=test1 bs=4M count=20
[...]
$ mkfs.ext4 -F test1
[...]
$ file test1
test1: Linux rev 1.0 ext4 filesystem data,
UUID=408f6da2-c4ef-4335-9574-985f3a349ed2 (extents) (huge files)

$ mkfs -O ^extent -F test1
[...]
$ file test1
test1: Linux rev 1.0 ext4 filesystem data,
UUID=23c046d6-db7a-419d-a1d5-0cba3c5b52d0 (huge files)

Hope this helps,
Vlad



More information about the Kernelnewbies mailing list