public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@kaigai.gr.jp>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] Add the latest xattr support on mtd-utils
Date: Sun, 06 Aug 2006 09:54:06 +0900	[thread overview]
Message-ID: <44D53DAE.5020803@kaigai.gr.jp> (raw)

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

Hi,

This patch enables to pack xattr informations for _recent_ xattr
implementation.

When I posted a patch which enables to operate xattr on NAND
flash by using delete marker at Jun, the format of xref node
was a bit changed.
As 'xseqno' was added into struct jffs2_raw_xref, I ought to
post a patch to modify it. But I left for posting.

Please apply it, Thanks.
-- 
KaiGai Kohei <kaigai@kaigai.gr.jp>

[-- Attachment #2: jffs2-xattr-v6.2-04-add-xseqno-on-mtdutils.patch --]
[-- Type: text/plain, Size: 1119 bytes --]

diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index 2cac60e..8fc99e5 100644
--- a/include/linux/jffs2.h
+++ b/include/linux/jffs2.h
@@ -186,6 +186,7 @@ struct jffs2_raw_xref
 	jint32_t hdr_crc;
 	jint32_t ino;		/* inode number */
 	jint32_t xid;		/* XATTR identifier number */
+	jint32_t xseqno;	/* xref sequencial number */
 	jint32_t node_crc;
 } __attribute__((packed));
 
diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
index fa4a5f3..c460a7b 100644
--- a/mkfs.jffs2.c
+++ b/mkfs.jffs2.c
@@ -1038,6 +1038,7 @@ typedef struct xattr_entry {
 #define XATTR_BUFFER_SIZE		(64 * 1024)	/* 64KB */
 static uint32_t enable_xattr = 0;
 static uint32_t highest_xid = 0;
+static uint32_t highest_xseqno = 0;
 
 static struct {
 	int xprefix;
@@ -1244,6 +1245,7 @@ static void write_xattr_entry(struct fil
 		ref.hdr_crc = cpu_to_je32(crc32(0, &ref, sizeof(struct jffs2_unknown_node) - 4));
 		ref.ino = cpu_to_je32(e->sb.st_ino);
 		ref.xid = cpu_to_je32(xe->xid);
+		ref.xseqno = cpu_to_je32(highest_xseqno += 2);
 		ref.node_crc = cpu_to_je32(crc32(0, &ref, sizeof(ref) - 4));
 
 		pad_block_if_less_than(sizeof(ref));

             reply	other threads:[~2006-08-06  0:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-06  0:54 KaiGai Kohei [this message]
2006-08-07 11:19 ` [PATCH] Add the latest xattr support on mtd-utils Josh Boyer
2006-08-07 14:06   ` KaiGai Kohei
2006-08-07 14:17     ` Josh Boyer

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=44D53DAE.5020803@kaigai.gr.jp \
    --to=kaigai@kaigai.gr.jp \
    --cc=linux-mtd@lists.infradead.org \
    /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