Create a 4k offline extent for each regular file.

After this change, all files have a single offline extent:

```
$ sudo src/filefrag-gc57857a5 -b4096 -v /mnt/scratch/top-0/file-1094
Filesystem type is: 554f4353
File size of /mnt/scratch/top-0/file-1094 is 4096 (1 block of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..       0:          0..         0:      1:             last,unknown_loc,eof
/mnt/scratch/top-0/file-1094: 1 extent found
```

Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
Auke Kok
2024-04-17 13:12:53 -04:00
parent c78b5cdecc
commit 281cd4f87a

View File

@@ -220,6 +220,9 @@ static struct gen_inode *generate_inode(struct opts *opts, u64 ino, mode_t mode)
gino->nr_xattrs = nr;
gino->inode.nr_xattrs = nr;
gino->inode.size = 4096;
gino->inode.offline = true;
}
return gino;