liu.song11 | 24 Oct 11:26 2014
Picon

[PATCH]jffs2:bugfix for should not appeared directory hard link

hi everyone

When jffs2 with summary, during the mounting period, in 
jffs2_build_remove_unlinked_inode will
handle unlinke inode, but this will cause unlinked directory's deletion 
dirent erased before
it's obsoleted dirent.So if the directory has renamed, then could cause a 
hard link when we 
remount jffs2.
We can stable reproduce the hard link only by following process.
1. we mount jffs2 in /mnt
2. create directories /mnt/SW1/, /mnt/SW2/
3. create directory /mnt/old/
4. rename /mnt/SW1/ to /mnt/old/SW1/, /mnt/SW2/ to /mnt/old/SW2/
5. do some data write. don't touch these directories.
6. rename /mnt/old/SW1/ to /mnt/SW1/, /mnt/old/SW2/ to /mnt/SW2/
7. delete /mnt/old/

do above process 3 - 7 several times, then reboot, during the mounting 
process, we could found
/mnt/SW1/ and /mnt/old/SW1/ become hard link,/mnt/SW2/ and /mnt/old/SW2/ 
become hard link. So we
do some job to fix this bug.We have tested this patch and the hard link 
error will never occur.
Thanks!
Best Regards
------------------------------------------------------------------------------------------------
diff --git a/build.c b/build.c
index a3750f9..ad7b8a6 100644
--- a/build.c
(Continue reading)

Akinobu Mita | 23 Oct 01:41 2014
Picon

[PATCH v3] nandsim: add id_bytes module parameter

nandsim can simulate NAND Flash which returns the ID bytes specified
by first_id_byte, ..., fourth_id_byte module parameters.

In order to simulate NAND flash which returns more than four ID bytes,
this adds id_bytes module parameter which is specified by the array of
byte like this:

 # modprobe nandsim id_bytes=0x98,0xdc,0x90,0x26,0x76,0x15,0x01,0x08 bch=1

This doesn't add fifth_id_byte, ..., seventh_id_byte module parameters,
because they are redundant.  But the existing first_id_byte, ...,
fourth_id_byte module parameters are preserved and add "(obsolete)" to
the description.

Cc: Artem Bityutskiy <artem.bityutskiy <at> linux.intel.com>
Cc: David Woodhouse <dwmw2 <at> infradead.org>
Cc: Brian Norris <computersforpeace <at> gmail.com>
Cc: linux-mtd <at> lists.infradead.org
Signed-off-by: Akinobu Mita <akinobu.mita <at> gmail.com>
---
* v3
- fix module parameter description for id_bytes, noticed by Brian

 drivers/mtd/nand/nandsim.c | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 504fb32..b9a5e8e 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
(Continue reading)

Brian Norris | 22 Oct 19:23 2014
Picon

[PATCH] mtd: docg3: fix 'defined but not used' warning

   drivers/mtd/devices/docg3.c:2122:28: warning: 'docg3_dt_ids' defined but not used [-Wunused-variable]
    static struct of_device_id docg3_dt_ids[] = {

Signed-off-by: Brian Norris <computersforpeace <at> gmail.com>
Cc: Robert Jarzmik <robert.jarzmik <at> free.fr>
---
 drivers/mtd/devices/docg3.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index abd94668a05d..0d9d3ee68b61 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
 <at>  <at>  -2119,11 +2119,13  <at>  <at>  static int __exit docg3_release(struct platform_device *pdev)
 	return 0;
 }

+#ifdef CONFIG_OF
 static struct of_device_id docg3_dt_ids[] = {
 	{ .compatible = "m-systems,diskonchip-g3" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, docg3_dt_ids);
+#endif

 static struct platform_driver g3_driver = {
 	.driver		= {
--

-- 
1.9.1

(Continue reading)

Rafał Miłecki | 22 Oct 18:05 2014
Picon

[PATCH] mtd: spi-nor: allow NULL as chip name and try to auto detect it

This will allow spi-nor users to plainly use JEDEC to detect flash chip.

Signed-off-by: Rafał Miłecki <zajec5 <at> gmail.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index ee777a4..1facaac 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
 <at>  <at>  -937,13 +937,21  <at>  <at>  int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode)
 	if (ret)
 		return ret;

-	id = spi_nor_match_id(name);
+	/* Try to auto-detect if chip name wasn't specified */
+	if (!name)
+		id = spi_nor_read_id(nor);
+	else
+		id = spi_nor_match_id(name);
 	if (!id)
 		return -ENOENT;

 	info = (void *)id->driver_data;

-	if (info->jedec_id) {
+	/*
+	 * If caller has specified name of flash model that can normally be
+	 * detected using JEDEC, let's verify it.
(Continue reading)

hujianyang | 22 Oct 12:37 2014

[PATCH v5 1/4] ubi-utils: ubidump: add ubifs-media

This is a preparatory patch for ubidump, an utility to print on-media
format of UBIFS partitions. This patch contains only one file named
ubifs-media.h which is entirely taken from linux kernel. This file
descibes the on-flash format of UBIFS objects and helps us to analyse
the data on the media.

Note, the start up commit of this file is not a completely copy from
fs/ubifs/ubifs-media.h in kernel. Only the code which is used by
ubidump is now presented here.

Signed-off-by: hujianyang <hujianyang <at> huawei.com>
---
 include/mtd/ubifs-media.h |  309 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100644 include/mtd/ubifs-media.h

diff --git a/include/mtd/ubifs-media.h b/include/mtd/ubifs-media.h
new file mode 100644
index 0000000..ff109e6
--- /dev/null
+++ b/include/mtd/ubifs-media.h
 <at>  <at>  -0,0 +1,309  <at>  <at> 
+/*
+ * Copyright (C) 2006-2008 Nokia Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
(Continue reading)

Josh Wu | 22 Oct 11:35 2014

[PATCH] atmel_nand: replace memcpy32_toio/memcpy32_fromio with memcpy

There is no need to use memcpy32_toio/memcpy32_fromio to transfer data
between memory and NFC sram. As the NFC sram is a also a memery space
not a io space.
So just use memcpy is enough.

Signed-off-by: Josh Wu <josh.wu <at> atmel.com>
---
 drivers/mtd/nand/atmel_nand.c | 32 ++++++--------------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 5c1423a..28d452e 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
 <at>  <at>  -105,7 +105,7  <at>  <at>  struct atmel_nfc {
 	struct completion	comp_xfer_done;

 	/* Point to the sram bank which include readed data via NFC */
-	void __iomem		*data_in_sram;
+	void 			*data_in_sram;
 	bool			will_write_sram;
 };
 static struct atmel_nfc	nand_nfc;
 <at>  <at>  -257,26 +257,6  <at>  <at>  static int atmel_nand_set_enable_ready_pins(struct mtd_info *mtd)
 	return res;
 }

-static void memcpy32_fromio(void *trg, const void __iomem  *src, size_t size)
-{
-	int i;
(Continue reading)

Sascha Hauer | 22 Oct 09:48 2014
Picon

[PATCH] mtd-utils: ubiformat: Add fastmap support

When flashing an image with ubiformat fastmap is not supported since
the first 64 eraseblocks are occupied with data, so the fastmap code
does not find a place to put the fastmap anchor. This series changes
this and allows to use fastmap with ubiformat flashed images.

Sascha Hauer (2):
      ubiformat: Factor out a write_eraseblock function
      ubiformat: Leave space for fastmap anchor

 ubi-utils/ubiformat.c | 251 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------
 1 file changed, 121 insertions(+), 130 deletions(-)

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Rafał Miłecki | 22 Oct 09:33 2014
Picon

[PATCH] mtd: spi-nor: prefer more specific entries from chips database

With few entries sharing the same JEDEC ID it could happen the less
specific one would be picked (depending on the order). We should prefer
entries with extended ID available.

Signed-off-by: Rafał Miłecki <zajec5 <at> gmail.com>
Cc: Bean Huo <beanhuo <at> micron.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index c51ee52..727ec3c 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
 <at>  <at>  -661,13 +661,26  <at>  <at>  static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor)

 	ext_jedec = id[3] << 8 | id[4];

-	for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) {
-		info = (void *)spi_nor_ids[tmp].driver_data;
-		if (info->jedec_id == jedec) {
-			if (info->ext_id == 0 || info->ext_id == ext_jedec)
+	/*
+	 * First let's look for entries with ext_id only. We don't want some
+	 * generic entry to take a precedence over more specific ones.
+	 */
+	if (ext_jedec) {
+		for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) {
+			info = (void *)spi_nor_ids[tmp].driver_data;
+			if (info->jedec_id == jedec &&
(Continue reading)

Artem Bityutskiy | 21 Oct 11:45 2014
Picon

Re: bad node type after using ubiupdatevol

On Tue, 2014-10-21 at 09:05 +0000, Per Smitt wrote:
> > First of all, do you have fastmap enabled or disabled (check
> > your .config)
> 
> It is not at all in my config. I am running a Freescale i.MX28 yocto
> solution and it uses kernel 2.6.35.3.

Oh, it is so old. There might have been fixes since then. And I am not
sure how out-of-date the MTD tests are in this kernel.

Artem

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Cyrille Pitchen | 21 Oct 10:04 2014

[PATCH 0/2] *** jffs2: fix debug outputs ***

Hi,

This series of patches fixes some bugs in the output of jffs2 debug functions.

Cyrille Pitchen (2):
  jffs2: fix wrong offset in an error msg from
    __jff2_dbg_prewrite_paranoia_check
  jffs2: fix buffer dump debug output

 fs/jffs2/debug.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

--

-- 
1.8.2.2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Artem Bityutskiy | 21 Oct 09:13 2014
Picon

[PATCH] UBIFS: fix budget leak in error path

From: Artem Bityutskiy <artem.bityutskiy <at> linux.intel.com>

We forgot to free the budget in 'write_begin_slow()' when 'do_readpage()'
fails. This patch fixes the issue.

Suggested-by: Kirill A. Shutemov <kirill.shutemov <at> linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy <at> linux.intel.com>
---
 fs/ubifs/file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index b5b593c..538519e 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
 <at>  <at>  -262,6 +262,7  <at>  <at>  static int write_begin_slow(struct address_space *mapping,
 			if (err) {
 				unlock_page(page);
 				page_cache_release(page);
+				ubifs_release_budget(c, &req);
 				return err;
 			}
 		}
--

-- 
1.9.3

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

(Continue reading)


Gmane