linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udf_count_free() and UDF discs with Metadata partition
@ 2019-12-26 11:37 Pali Rohár
  2020-01-07 14:45 ` Jan Kara
  0 siblings, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2019-12-26 11:37 UTC (permalink / raw)
  To: linux-fsdevel, Jan Kara

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

Hello!

During testing of udfinfo tool (from udftools project) I found that
udfinfo's implementation for calculating free space does not work when
UDF filesystem has Metadata partition (according to OSTA UDF 2.50).

Year ago in udfinfo for calculating free space I used same algorithm as
is implemented in kernel UDF driver, function udf_count_free(). So I
suspect kernel driver could have it incorrectly implemented too, but I'm
not sure. So I'm sending this email to let you know about it.

What is the problem? UDF Metadata partition is stored directly on UDF
Physical partition and therefore free space calculation needs to be done
from Physical one (same applies for Virtual partition). But Metadata
partition contains mapping table for logical <--> physical blocks, so
reading data needs to be done always from Metadata partition. Also in
UDF terminology are two different things: Partition and Partition Map.
And "partition number" is a bit misleading as sometimes it refers to
"Partition" and sometimes to "Partition Map" what are two different
things.

Calculation problem in udfinfo I fixed in this commit:
https://github.com/pali/udftools/commit/1763c9f899bdbdb68b1a44a8cb5edd5141107043

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-07 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-26 11:37 udf_count_free() and UDF discs with Metadata partition Pali Rohár
2020-01-07 14:45 ` Jan Kara
2020-01-07 15:01   ` Pali Rohár
2020-01-07 15:29     ` Jan Kara

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).