Hello,
I'm using mkfs.ext4 in Yocto using option to create image from existing folder (-d option)
Is there any reason to set destination inode mode "appending permissions" istead of just set them as they are in the original inode?

see line 119 on https://github.com/tytso/e2fsprogs/blob/master/misc/create_inode.c

inode.i_mode |= st->st_mode;

Doing so, under Yocto, some permissions are not the intended one.

In other words, why not set permissions like this:

inode.i_mode = st->st_mode;

BR,
Alessio