public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: jmorris@redhat.com, "KaiGai Kohei" <kaigai@ak.jp.nec.com>,
	russell@coker.com.au, lorenzo@gnu.org,
	linux-mtd@lists.infradead.org, sds@tycho.nsa.gov,
	"Jörn Engel" <joern@wohnheim.fh-wedel.de>
Subject: Re: [PATCH] XATTR support on JFFS2 (version. 5)
Date: Wed, 10 May 2006 01:10:22 +0900	[thread overview]
Message-ID: <4460BEEE.2070704@ak.jp.nec.com> (raw)
In-Reply-To: <1147092567.2766.146.camel@pmac.infradead.org>

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

Hi,

Some fixes and updates on the todo list are already
pushed to git://git.infradead.org/jffs2-xattr-2.6.git .

The broken-out patches are available at here:
http://www.kaigai.gr.jp/index.php?FrontPage#vd169842

01. jffs2-xattr-v5.1-01-remove_typedef_kernel.patch
02. jffs2-xattr-v5.1-02-remove_typedef_utils.patch
03. jffs2-xattr-v5.1-03-append_README.Locking.patch
04. jffs2-xattr-v5.1-04-remove_ilist_from_ic.patch
05. jffs2-xattr-v5.1-05-update_xattr_gc.patch
06. jffs2-xattr-v5.1-06-add_list.h.patch
07. jffs2-xattr-v5.1-07-unify_file_header.patch
08. jffs2-xattr-v5.1-08-remove_senseless_comment.patch
09. jffs2-xattr-v5.1-09-remove__KERNEL__.patch
10. jffs2-xattr-v5.1-10-remove_pointer_cast.patch

I hope to merge the second patch (jffs2-xattr-v5.1-02-remove_typedef_utils.patch),
because this patch is for mtd-utils.git, not jffs2-xattr-2.6.git.

P.S.
Thanks David for your introduction about git on infradead.org.

David Woodhouse wrote:
> On Mon, 2006-05-08 at 11:03 +0900, KaiGai Kohei wrote:
> 
>>[Current TODO list]
>>* Fix the declaration of jffs2_acl_header and so on by using 'struct'
>>   instead of 'typedef' in kernel space.
>>- Fix the declaration of jffs2_acl_header and so on by using 'struct'
>>   instead of 'typedef' in user space header.
>>* Add documentation about xattr_sem into README.Locking.
>>* Call jffs2_garbage_collect_xattr_datum/ref() from gc.c directly
>>   instead of jffs2_garbage_collect_xattr()
>>- Use unidirection list beween inode_chache and xattr_ref, instead of
>>   list_head.
>>- Add '#include <linux/list.h>' into xattr.h.
>>- Unify each file header part with any jffs2 files.
>>- Remove a senseless comment. ("/* forward refence */")
>>- Remove unneccesary pointer casts.
>>- Remove unneccesary '#ifdef __KERNEL__' on acl.h
>>
>>*: It has already prepared, but I've not publicated yet.
>>-: It has not prepated yet. I should work from now. 
> 
> 
> That's an excellent summary; thanks. It does serve to show that we've
> mostly picked on cosmetic details so far though :)
> 
> If you have patches committed into a git tree, you should be able to
> just 'git-push ssh://git.infradead.org/home/git/jffs2-xattr-2.6.git' to
> make it available.
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>

[-- Attachment #2: jffs2-xattr-v5.1-02-remove_typedef_utils.patch --]
[-- Type: text/plain, Size: 3190 bytes --]

diff --git a/include/mtd/jffs2-user.h b/include/mtd/jffs2-user.h
index 8b53990..bc5d99a 100644
--- a/include/mtd/jffs2-user.h
+++ b/include/mtd/jffs2-user.h
@@ -50,33 +50,33 @@ extern int target_endian;
 #define XATTR_TRUSTED_PREFIX		"trusted."
 #define XATTR_TRUSTED_PREFIX_LEN	(sizeof (XATTR_TRUSTED_PREFIX) - 1)
 
-typedef struct {
+struct jffs2_acl_entry {
 	jint16_t	e_tag;
 	jint16_t	e_perm;
 	jint32_t	e_id;
-} jffs2_acl_entry;
+};
 
-typedef struct {
+struct jffs2_acl_entry_short {
 	jint16_t	e_tag;
 	jint16_t	e_perm;
-} jffs2_acl_entry_short;
+};
 
-typedef struct {
+struct jffs2_acl_header {
 	jint32_t	a_version;
-} jffs2_acl_header;
+};
 
 /* copied from include/linux/posix_acl_xattr.h */
 #define POSIX_ACL_XATTR_VERSION 0x0002
 
-typedef struct {
+struct posix_acl_xattr_entry {
 	uint16_t		e_tag;
 	uint16_t		e_perm;
 	uint32_t		e_id;
-} posix_acl_xattr_entry;
+};
 
-typedef struct {
-	uint32_t		a_version;
-	posix_acl_xattr_entry	a_entries[0];
-} posix_acl_xattr_header;
+struct posix_acl_xattr_header {
+	uint32_t			a_version;
+	struct posix_acl_xattr_entry	a_entries[0];
+};
 
 #endif /* __JFFS2_USER_H__ */
diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
index 02f57f9..fa4a5f3 100644
--- a/mkfs.jffs2.c
+++ b/mkfs.jffs2.c
@@ -1052,22 +1052,22 @@ static struct {
 	{ 0, NULL, 0 }
 };
 
-static void formalize_posix_acl(char *xvalue, int *value_len)
+static void formalize_posix_acl(void *xvalue, int *value_len)
 {
-	posix_acl_xattr_header *pacl_header;
-	posix_acl_xattr_entry *pent, *plim;
-	jffs2_acl_header *jacl_header;
-	jffs2_acl_entry *jent;
-	jffs2_acl_entry_short *jent_s;
+	struct posix_acl_xattr_header *pacl_header;
+	struct posix_acl_xattr_entry *pent, *plim;
+	struct jffs2_acl_header *jacl_header;
+	struct jffs2_acl_entry *jent;
+	struct jffs2_acl_entry_short *jent_s;
 	char buffer[XATTR_BUFFER_SIZE];
 	int offset = 0;
 
-	pacl_header = (posix_acl_xattr_header *)xvalue;;
+	pacl_header = xvalue;;
 	pent = pacl_header->a_entries;
-	plim = (posix_acl_xattr_entry *)(xvalue + *value_len);
+	plim = xvalue + *value_len;
 
-	jacl_header = (jffs2_acl_header *)buffer;
-	offset += sizeof(jffs2_acl_header);
+	jacl_header = (struct jffs2_acl_header *)buffer;
+	offset += sizeof(struct jffs2_acl_header);
 	jacl_header->a_version = cpu_to_je32(JFFS2_ACL_VERSION);
 
 	while (pent < plim) {
@@ -1076,15 +1076,15 @@ static void formalize_posix_acl(char *xv
 		case ACL_GROUP_OBJ:
 		case ACL_MASK:
 		case ACL_OTHER:
-			jent_s = (jffs2_acl_entry_short *)(buffer + offset);
-			offset += sizeof(jffs2_acl_entry_short);
+			jent_s = (struct jffs2_acl_entry_short *)(buffer + offset);
+			offset += sizeof(struct jffs2_acl_entry_short);
 			jent_s->e_tag = cpu_to_je16(le16_to_cpu(pent->e_tag));
 			jent_s->e_perm = cpu_to_je16(le16_to_cpu(pent->e_perm));
 			break;
 		case ACL_USER:
 		case ACL_GROUP:
-			jent = (jffs2_acl_entry *)(buffer + offset);
-			offset += sizeof(jffs2_acl_entry);
+			jent = (struct jffs2_acl_entry *)(buffer + offset);
+			offset += sizeof(struct jffs2_acl_entry);
 			jent->e_tag = cpu_to_je16(le16_to_cpu(pent->e_tag));
 			jent->e_perm = cpu_to_je16(le16_to_cpu(pent->e_perm));
 			jent->e_id = cpu_to_je32(le32_to_cpu(pent->e_id));

  reply	other threads:[~2006-05-09 16:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-06  6:51 [PATCH] XATTR support on JFFS2 (version. 5) KaiGai Kohei
2006-05-06 12:07 ` David Woodhouse
2006-05-06 12:38   ` David Woodhouse
2006-05-06 16:47     ` KaiGai Kohei
2006-05-06 17:53       ` David Woodhouse
2006-05-07  0:22         ` KaiGai Kohei
2006-05-07  0:29           ` David Woodhouse
2006-05-07 10:19         ` Artem B. Bityutskiy
2006-05-07 13:25       ` Artem B. Bityutskiy
2006-05-07 13:29         ` David Woodhouse
2006-05-07 12:46 ` Artem B. Bityutskiy
2006-05-07 13:12   ` Artem B. Bityutskiy
2006-05-07 13:18   ` David Woodhouse
2006-05-08  1:01     ` KaiGai Kohei
2006-05-07 17:16 ` Jörn Engel
2006-05-08  2:03   ` KaiGai Kohei
2006-05-08 12:49     ` David Woodhouse
2006-05-09 16:10       ` KaiGai Kohei [this message]
2006-05-11 23:16         ` KaiGai Kohei
2006-05-11 23:31           ` David Woodhouse
2006-05-12 15:20             ` KaiGai Kohei
2006-05-12 15:32               ` Jörn Engel
2006-05-12 15:38               ` David Woodhouse
2006-05-13  6:37                 ` KaiGai Kohei
2006-05-13 10:46                   ` David Woodhouse
2006-05-10 13:28       ` Jörn Engel
2006-05-10 10:03 ` Artem B. Bityutskiy
2006-05-10 11:06   ` David Woodhouse
2006-05-10 11:22     ` Artem B. Bityutskiy
2006-05-10 12:03     ` KaiGai Kohei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4460BEEE.2070704@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=dwmw2@infradead.org \
    --cc=jmorris@redhat.com \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=lorenzo@gnu.org \
    --cc=russell@coker.com.au \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox