* Re: [PATCH v2] Ext4 documentation fixes.
[not found] <CA+UE=SPyMXZUhHFm0KgvihPdaE=yH5ra6n1C4XhKgM6aGheo=A@mail.gmail.com>
@ 2019-08-23 3:18 ` Theodore Y. Ts'o
[not found] ` <71dfe444-3efb-5f1c-d8a1-bb0e98002fd1@mixmax.com>
[not found] ` <DEDD6BA5-6E18-4ED6-9EF6-E11EDA593700@dilger.ca>
1 sibling, 1 reply; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-08-23 3:18 UTC (permalink / raw)
To: Ayush Ranjan
Cc: Andreas Dilger, Jonathan Corbet, Ext4 Developers List, linux-doc,
Linux Kernel Mailing List
On Thu, Aug 15, 2019 at 09:11:51AM -0700, Ayush Ranjan wrote:
> This commit aims to fix the following issues in ext4 documentation:
> - Flexible block group docs said that the aim was to group block
> metadata together instead of block group metadata.
> - The documentation consistly uses "location" instead of "block number".
> It is easy to confuse location to be an absolute offset on disk. Added
> a line to clarify all location values are in terms of block numbers.
> - Dirent2 docs said that the rec_len field is shortened instead of the
> name_len field.
> - Typo in bg_checksum description.
> - Inode size is 160 bytes now, and hence i_extra_isize is now 32.
> - Cluster size formula was incorrect, it did not include the +10 to
> s_log_cluster_size value.
> - Typo: there were two s_wtime_hi in the superblock struct.
> - Superblock struct was outdated, added the new fields which were part
> of s_reserved earlier.
> - Multiple mount protection seems to be implemented in fs/ext4/mmp.c.
>
> Signed-off-by: Ayush Ranjan <ayushr2@illinois.edu>
Fixed with one minor typo fix:
> diff --git a/Documentation/filesystems/ext4/group_descr.rst
> b/Documentation/filesystems/ext4/group_descr.rst
> index 0f783ed88..feb5c613d 100644
> --- a/Documentation/filesystems/ext4/group_descr.rst
> +++ b/Documentation/filesystems/ext4/group_descr.rst
> @@ -100,7 +100,7 @@ The block group descriptor is laid out in ``struct
> ext4_group_desc``.
> - \_\_le16
> - bg\_checksum
> - Group descriptor checksum; crc16(sb\_uuid+group+desc) if the
> - RO\_COMPAT\_GDT\_CSUM feature is set, or crc32c(sb\_uuid+group\_desc) &
> + RO\_COMPAT\_GDT\_CSUM feature is set, or crc32c(sb\_uuid+group+desc) &
> 0xFFFF if the RO\_COMPAT\_METADATA\_CSUM feature is set.
The correct checksum should be "crc16(sb\_uuid+group\_desc)" or
"crc32c(sb\_uuid+group\_desc)". That is, it's previous line which
needed modification.
- Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Ext4 documentation fixes.
[not found] ` <71dfe444-3efb-5f1c-d8a1-bb0e98002fd1@mixmax.com>
@ 2019-08-23 14:16 ` Theodore Y. Ts'o
0 siblings, 0 replies; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-08-23 14:16 UTC (permalink / raw)
To: Ayush Ranjan
Cc: Andreas Dilger, Jonathan Corbet, Ext4 Developers List, linux-doc,
Linux Kernel Mailing List
On Fri, Aug 23, 2019 at 04:56:42AM +0000, Ayush Ranjan wrote:
> Hey Ted!
> Thanks for reviewing! The comment in fs/ext4/ext4.h:ext4_group_desc:bg_checksum
> says that the crc16 checksum formula should be crc16(sb_uuid+group+desc). I
> think group over here denotes group number.
>
> Briefly looking through fs/ext4/super.c:ext4_group_desc_csum() suggests that:
> - For the new metadata_csum algorithm, only the group number and the block
> descriptor are included in the checksum. So the formula should be
> crc32c(group+desc) & 0xFFF (this looks like a bug as this should also include sb
> UUID?)
> - For the old crc16 algorithm, the sb UUID, group number and the block
> descriptor are included in the checksum. So the formula should be
> crc16(sb\_uuid+group+desc). (should remain unchanged)
Thanks for the research and explanation. I think I'm going to change
that to be:
crc{16,32c}(sb_uuid + group_num + bg_desc)
That should make it clearer what is meant.
- Ted
>
> Ayush Ranjan
> University of Illinois - Urbana Champaign | May 2020
> Bachelors of Science in Computer Science and Mathematics
> Business Minor | Gies College of Business
>
>
> On Fri, Aug 23, 2019 at 8:48 AM Theodore Y. Ts'o <tytso@mit.edu> wrote:
> >
> > On Thu, Aug 15, 2019 at 09:11:51AM -0700, Ayush Ranjan wrote:
> > > This commit aims to fix the following issues in ext4 documentation:
> > > - Flexible block group docs said that the aim was to group block
> > > metadata together instead of block group metadata.
> > > - The documentation consistly uses "location" instead of "block number".
> > > It is easy to confuse location to be an absolute offset on disk. Added
> > > a line to clarify all location values are in terms of block numbers.
> > > - Dirent2 docs said that the rec_len field is shortened instead of the
> > > name_len field.
> > > - Typo in bg_checksum description.
> > > - Inode size is 160 bytes now, and hence i_extra_isize is now 32.
> > > - Cluster size formula was incorrect, it did not include the +10 to
> > > s_log_cluster_size value.
> > > - Typo: there were two s_wtime_hi in the superblock struct.
> > > - Superblock struct was outdated, added the new fields which were part
> > > of s_reserved earlier.
> > > - Multiple mount protection seems to be implemented in fs/ext4/mmp.c.
> > >
> > > Signed-off-by: Ayush Ranjan <ayushr2@illinois.edu>
> >
> > Fixed with one minor typo fix:
> >
> > > diff --git a/Documentation/filesystems/ext4/group_descr.rst
> > > b/Documentation/filesystems/ext4/group_descr.rst
> > > index 0f783ed88..feb5c613d 100644
> > > --- a/Documentation/filesystems/ext4/group_descr.rst
> > > +++ b/Documentation/filesystems/ext4/group_descr.rst
> > > @@ -100,7 +100,7 @@ The block group descriptor is laid out in ``struct
> > > ext4_group_desc``.
> > > - \_\_le16
> > > - bg\_checksum
> > > - Group descriptor checksum; crc16(sb\_uuid+group+desc) if the
> > > - RO\_COMPAT\_GDT\_CSUM feature is set, or
> crc32c(sb\_uuid+group\_desc) &
> > > + RO\_COMPAT\_GDT\_CSUM feature is set, or crc32c(sb\_uuid+group+desc)
> &
> > > 0xFFFF if the RO\_COMPAT\_METADATA\_CSUM feature is set.
> >
> > The correct checksum should be "crc16(sb\_uuid+group\_desc)" or
> > "crc32c(sb\_uuid+group\_desc)". That is, it's previous line which
> > needed modification.
> >
> > - Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Ext4 documentation fixes.
[not found] ` <DEDD6BA5-6E18-4ED6-9EF6-E11EDA593700@dilger.ca>
@ 2019-08-24 21:24 ` Jonathan Corbet
2019-08-24 23:09 ` Theodore Y. Ts'o
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Corbet @ 2019-08-24 21:24 UTC (permalink / raw)
To: Andreas Dilger
Cc: Ayush Ranjan, Theodore Ts'o, Andreas Dilger,
Ext4 Developers List, linux-doc, Linux Kernel Mailing List
On Thu, 15 Aug 2019 09:16:23 -0700
Andreas Dilger <adilger@dilger.ca> wrote:
> On Aug 15, 2019, at 09:11, Ayush Ranjan <ayushr2@illinois.edu> wrote:
> >
> > This commit aims to fix the following issues in ext4 documentation:
> > - Flexible block group docs said that the aim was to group block
> > metadata together instead of block group metadata.
> > - The documentation consistly uses "location" instead of "block number".
> > It is easy to confuse location to be an absolute offset on disk. Added
> > a line to clarify all location values are in terms of block numbers.
> > - Dirent2 docs said that the rec_len field is shortened instead of the
> > name_len field.
> > - Typo in bg_checksum description.
> > - Inode size is 160 bytes now, and hence i_extra_isize is now 32.
> > - Cluster size formula was incorrect, it did not include the +10 to
> > s_log_cluster_size value.
> > - Typo: there were two s_wtime_hi in the superblock struct.
> > - Superblock struct was outdated, added the new fields which were part
> > of s_reserved earlier.
> > - Multiple mount protection seems to be implemented in fs/ext4/mmp.c.
> >
> > Signed-off-by: Ayush Ranjan <ayushr2@illinois.edu>
>
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
I've applied this to the docs tree.
However, Ayush: the patch was rather badly corrupted by your mail client.
I managed to fix it up, but please in the future verify that you can email
a patch to yourself and apply it before submitting it. There may be some
useful hints in Documentation/process/email-clients.rst .
Thanks,
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Ext4 documentation fixes.
2019-08-24 21:24 ` Jonathan Corbet
@ 2019-08-24 23:09 ` Theodore Y. Ts'o
2019-08-25 14:42 ` Jonathan Corbet
0 siblings, 1 reply; 5+ messages in thread
From: Theodore Y. Ts'o @ 2019-08-24 23:09 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Andreas Dilger, Ayush Ranjan, Andreas Dilger,
Ext4 Developers List, linux-doc, Linux Kernel Mailing List
On Sat, Aug 24, 2019 at 03:24:53PM -0600, Jonathan Corbet wrote:
> I've applied this to the docs tree.
>
> However, Ayush: the patch was rather badly corrupted by your mail client.
> I managed to fix it up, but please in the future verify that you can email
> a patch to yourself and apply it before submitting it. There may be some
> useful hints in Documentation/process/email-clients.rst .
Hi Jon,
If you haven't pushed out your doc tree, can you please drop it? I've
already applied an (improved) version of this patch to the ext4 tree,
and I actually have some plans to do further fixups of ext4 on-disk
format documentation in the ext4 tree. So it would be easier if we
keep ext4 documentation updates in the ext4 git tree.
Thanks,
- Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Ext4 documentation fixes.
2019-08-24 23:09 ` Theodore Y. Ts'o
@ 2019-08-25 14:42 ` Jonathan Corbet
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2019-08-25 14:42 UTC (permalink / raw)
To: Theodore Y. Ts'o
Cc: Andreas Dilger, Ayush Ranjan, Andreas Dilger,
Ext4 Developers List, linux-doc, Linux Kernel Mailing List
On Sat, 24 Aug 2019 19:09:30 -0400
"Theodore Y. Ts'o" <tytso@mit.edu> wrote:
> If you haven't pushed out your doc tree, can you please drop it? I've
> already applied an (improved) version of this patch to the ext4 tree,
> and I actually have some plans to do further fixups of ext4 on-disk
> format documentation in the ext4 tree. So it would be easier if we
> keep ext4 documentation updates in the ext4 git tree.
Sigh...I checked linux-next first and saw no signs of activity there. Oh
well; I guess I can disappear that change.
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-25 14:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CA+UE=SPyMXZUhHFm0KgvihPdaE=yH5ra6n1C4XhKgM6aGheo=A@mail.gmail.com>
2019-08-23 3:18 ` [PATCH v2] Ext4 documentation fixes Theodore Y. Ts'o
[not found] ` <71dfe444-3efb-5f1c-d8a1-bb0e98002fd1@mixmax.com>
2019-08-23 14:16 ` Theodore Y. Ts'o
[not found] ` <DEDD6BA5-6E18-4ED6-9EF6-E11EDA593700@dilger.ca>
2019-08-24 21:24 ` Jonathan Corbet
2019-08-24 23:09 ` Theodore Y. Ts'o
2019-08-25 14:42 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).