Re: [PATCH 1/3] mke2fs: print a message when creating a regular file

Theodore Ts'o
2014-05-05T14:49:45Z

On Mon, May 05, 2014 at 09:46:29AM -0500, Eric Sandeen wrote:
> > Even if there is some case in the future where dev_size could be left
> > unset, it will be initialized to zero, at which point we will fail
> > safe by skipping the mke2fs_discard_device() call.
>
> I kind of lost the thread here; if it is impossible to be unset, why
> add the check?
>
> And if (!dev_size) what would happen on this path? I guess I need to get
> all the pending patches applied to see what's changed in this area.

It's mostly cosmetic, to be honest. It avoids this confusing line:

5% ./misc/mke2fs -t ext4 /tmp/foo.img 16M
mke2fs 1.42.9 (4-Feb-2014)
Creating regular file /tmp/foo.img
Discarding device: done <========== this nonsense line
Creating filesystem with 16384 1k blocks and 4096 inodes
Filesystem UUID: 515a4e52-79f1-4317-ad61-a87c492c1371
Superblock backups stored on blocks:
8193
...

- Ted