linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* uninit_bg compatibility?
@ 2010-09-21 13:28 Bo Brantén
  2010-09-21 17:00 ` Andreas Dilger
  2010-09-21 17:59 ` Ted Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Bo Brantén @ 2010-09-21 13:28 UTC (permalink / raw)
  To: linux-ext4


Hello,

when writing new files to an ext4 file system using the Windows driver 
fsck will later complain "Group descriptor nn checksum is invalid" and I 
think that is because it used an yet unused block group without knowing 
that they can be marked as uninitialized. So I thought a simple patch 
would be to mount the file system read-only if that feature is in use 
untill the driver is updated with full write support but I can't find the 
flag to use, there is no EXT4_FEATURE_RO_COMPAT_UNINIT_BG so I thought I 
ask here if anyone could clear this out.

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

* Re: uninit_bg compatibility?
  2010-09-21 13:28 uninit_bg compatibility? Bo Brantén
@ 2010-09-21 17:00 ` Andreas Dilger
  2010-09-21 17:59 ` Ted Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Dilger @ 2010-09-21 17:00 UTC (permalink / raw)
  To: Bo Brantén; +Cc: linux-ext4

On 2010-09-21, at 06:28, Bo Brantén wrote:
> when writing new files to an ext4 file system using the Windows driver fsck will later complain "Group descriptor nn checksum is invalid" and I think that is because it used an yet unused block group without knowing that they can be marked as uninitialized. So I thought a simple patch would be to mount the file system read-only if that feature is in use untill the driver is updated with full write support but I can't find the flag to use, there is no EXT4_FEATURE_RO_COMPAT_UNINIT_BG so I thought I ask here if anyone could clear this out.

The Windows driver (or any driver for that matter) should ONLY allow read-only access if ANY feature in s_feature_ro_compat is unknown, and completely refuse to mount if any feature in s_feature_incompat is unknown.

The actual feature flag is called EXT4_FEATURE_RO_COMPAT_GDT_CSUM, but that doesn't matter, since what the code should be doing is masking off the features that it DOES understand and checking if any feature bits are remaining.


Cheers, Andreas





--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: uninit_bg compatibility?
  2010-09-21 13:28 uninit_bg compatibility? Bo Brantén
  2010-09-21 17:00 ` Andreas Dilger
@ 2010-09-21 17:59 ` Ted Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2010-09-21 17:59 UTC (permalink / raw)
  To: Bo Brantén; +Cc: linux-ext4

On Tue, Sep 21, 2010 at 03:28:51PM +0200, Bo Brantén wrote:
> 
> when writing new files to an ext4 file system using the Windows
> driver fsck will later complain "Group descriptor nn checksum is
> invalid" and I think that is because it used an yet unused block
> group without knowing that they can be marked as uninitialized. So I
> thought a simple patch would be to mount the file system read-only
> if that feature is in use untill the driver is updated with full
> write support but I can't find the flag to use, there is no
> EXT4_FEATURE_RO_COMPAT_UNINIT_BG so I thought I ask here if anyone
> could clear this out.

Yeah, this is one where we decided to change the feature to uninit_bg
(since that describes the net benefit to the end-user), but we never
ended up changing the name of the flag in the source code.  The
feature flag in question is:

#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010

I'll note that the Windows driver must not be checking the feature
flags, since the whole point of RO_COMPAT flags is that if a file
system implementation (such as the Windows drivers) sees an RO_COMPAT
flag it doesn't understand, it's supposed to treat the file system as
read-only.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2010-09-21 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 13:28 uninit_bg compatibility? Bo Brantén
2010-09-21 17:00 ` Andreas Dilger
2010-09-21 17:59 ` Ted Ts'o

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