lkml.org 
[lkml]   [2017]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Bug fix for uid/gid in jffs2
From
Date
On Wed, 2017-03-01 at 16:44 +0800, yangshukui wrote:
>
> @@ -146,8 +146,8 @@ struct jffs2_raw_inode
>       jint32_t ino;        /* Inode number.  */
>       jint32_t version;    /* Version number.  */
>       jmode_t mode;       /* The file's type or mode.  */
> -    jint16_t uid;        /* The file's owner.  */
> -    jint16_t gid;        /* The file's group.  */
> +    jint32_t uid;        /* The file's owner.  */
> +    jint32_t gid;        /* The file's group.  */

This is changing the binary data structures on the flash, and breaking
compatibility with all existing file systems. Your modified kernel
won't be able to mount existing JFFS2 images.

The way to do this, if we really do need 32-bit ugid support in JFFS2,
is to define a *new* node (JFFS2_NODE_INCOMPAT) type, and then support
reading both. You could even contrive a way to make it
JFFS2_NODE_ROCOMPAT; perhaps a new node type which contains *only* the
(32-bit) ownership information and overrides the 16-bit ones in the
original data nodes? [unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2017-03-01 16:39    [W:0.581 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site