<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git, branch v1.5.0</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v1.5.0</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v1.5.0'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2012-05-07T07:19:39+00:00</updated>
<entry>
<title>Release mtd-utils-1.5.0</title>
<updated>2012-05-07T07:19:39+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-05-07T07:19:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f'/>
<id>urn:sha1:ca39eb1d98e736109c64ff9c1aa2a6ecca222d8f</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtd-utils: better document --pagesize of mkfs.jffs2</title>
<updated>2012-05-04T08:29:29+00:00</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik.ladkani@gmail.com</email>
</author>
<published>2012-05-03T18:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=21e10ce956a900a08a9df1a780af1246103f0f0f'/>
<id>urn:sha1:21e10ce956a900a08a9df1a780af1246103f0f0f</id>
<content type='text'>
Add a strict explanation '--pagesize' refers to target system's mm page
size.

Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Makefile: fixup previous 'make clean' fix</title>
<updated>2012-04-02T08:09:25+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-03-28T23:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=d970b4850204553b8cc3bcba6d7219945b15d67c'/>
<id>urn:sha1:d970b4850204553b8cc3bcba6d7219945b15d67c</id>
<content type='text'>
Apparently, Makefile comments need to be made without indentation. Otherwise,
they are printed out as shell commands. This fix prevents seeing this in your
shell during 'make clean':

  $ make clean
  ...
  # findutils v4.1.x (RHEL 4) do not have '+' syntax
  ...

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Makefile: fix "make clean" for old GNU find</title>
<updated>2012-03-12T13:07:27+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-03-09T17:49:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=424050cf57f797d635059b18ba6b8591c3fc126f'/>
<id>urn:sha1:424050cf57f797d635059b18ba6b8591c3fc126f</id>
<content type='text'>
findutils v4.1.x does not have the `-exec CMD {} +' syntax. We can just as
easily use the `-exec CMD {} \;' syntax. However, it will launch a lot more
`rm' processes, so we only use it if the first form fails with an error.
This isn't a perfect solution (`find -exec +' can fail for other reasons)
but it works well enough.

This problem manifests itself in RHEL 4, findutils 4.1.20:

  $ make clean
  rm -f /XXX/mtd-utils/*.o /XXX/mtd-utils/ftl_format  ...
  find: missing argument to `-exec'
  make: *** [clean] Error 1

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mkfs.ubifs: do not ignore --max-leb-cnt when formatting an UBI volume</title>
<updated>2012-03-07T14:08:30+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-03-07T14:08:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c36e0067ffdae9ca83abae89f2d22dc9013d9734'/>
<id>urn:sha1:c36e0067ffdae9ca83abae89f2d22dc9013d9734</id>
<content type='text'>
When the output file is an UBI volume - mkfs.ubifs just sets --max-leb-cnt
to the volume size and ignores the user-supplied --max-leb-cnt value, which
is wrong. Let's set it to the volume size only if the user did not supply
--max-leb-cnt.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd_legacy: don't open device in R/W</title>
<updated>2012-02-29T07:19:17+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-08T21:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ac10be41ad321752682f2549ebc42b2512012f60'/>
<id>urn:sha1:ac10be41ad321752682f2549ebc42b2512012f60</id>
<content type='text'>
On legacy kernels with ROM devices, we can get mtdinfo errors like:

libmtd: error!: cannot open "/dev/mtd4"
        error 13 (Permission denied)
mtdinfo: error!: libmtd failed get MTD device 4 information
         error 13 (Permission denied)

We don't need O_RDRW access for informational ioctls(), so make this
O_RDONLY.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: perform device checking first</title>
<updated>2012-02-29T07:19:17+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-08T21:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c3e2250260f9ab7846cea5ae974ddb7379a8fef6'/>
<id>urn:sha1:c3e2250260f9ab7846cea5ae974ddb7379a8fef6</id>
<content type='text'>
If we don't check for the MTD before calling `legacy_get_dev_info1', we may
get errors like:

libmtd: MTD subsystem is old and does not support sysfs, so MTD character device nodes have to exist
libmtd: error!: "/dev/mtd2" is not a character device
mtdinfo: error!: libmtd failed get MTD device 2 information
         error 22 (Invalid argument)

So reverse the order of these two checks.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: fix mtd_write() issues for large data-only writes</title>
<updated>2012-02-14T09:01:20+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-11T04:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=71c76e74661492b4f68f670514866cfc85f47089'/>
<id>urn:sha1:71c76e74661492b4f68f670514866cfc85f47089</id>
<content type='text'>
ioctl(MEMWRITE) is implemented with memdup_user(), and so it allocates
kernel memory in contiguous regions. This limits its usefulness for large
amounts of data, since contiguous kernel memory can become scarce. I have
experienced "out of memory" problems with ubiformat, for instance, which
writes in eraseblock-sized regions:

  ...
  ubiformat: flashing eraseblock 12 -- 72 % complete
  ubiformat: page allocation failure.
  order:8, mode:0xd0
  Call Trace:
  [&lt;8043fa7c&gt;] dump_stack+0x8/0x34
  [&lt;8008c940&gt;] __alloc_pages_nodemask+0x408/0x618
  [&lt;800bd748&gt;] cache_alloc_refill+0x400/0x730
  [&lt;800bdbbc&gt;] __kmalloc+0x144/0x154
  [&lt;8009cae4&gt;] memdup_user+0x24/0x94
  [&lt;802d04e4&gt;] mtd_ioctl+0xba8/0xbd0
  [&lt;802d0544&gt;] mtd_unlocked_ioctl+0x38/0x5c
  [&lt;800d43c0&gt;] do_vfs_ioctl+0xa4/0x6e4
  [&lt;800d4a44&gt;] sys_ioctl+0x44/0xa0
  [&lt;8000f95c&gt;] stack_done+0x20/0x40
  ...
  libmtd: error!: MEMWRITE ioctl failed for eraseblock 12 (mtd0)
          error 12 (Cannot allocate memory)
  ubiformat: error!: cannot write eraseblock 12
             error 12 (Cannot allocate memory)

This error can be mitigated for now by only using ioctl(MEMWRITE) when we
need to write OOB data, since we can only do this in small transactions
anyway. Then, data-only transactions (like those originating from
ubiformat) can be carried out with write() calls.

This issue can also be solved within the kernel ioctl(), but either way,
this patch is still useful, since write() is more straightforward (and
efficient?) than ioctl() for data-only writes.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtdinfo: correct grammar on error message</title>
<updated>2012-02-14T09:00:13+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-09T18:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b989a29c2c1159867e03356d49a2903431899159'/>
<id>urn:sha1:b989a29c2c1159867e03356d49a2903431899159</id>
<content type='text'>
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>libmtd: fix segmentation fault on lib-&gt;mtd</title>
<updated>2012-02-14T09:00:12+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2012-02-09T18:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6571ef822aa7d782a8168d39a27fa3e65a3032be'/>
<id>urn:sha1:6571ef822aa7d782a8168d39a27fa3e65a3032be</id>
<content type='text'>
Legacy systems do not initialize lib-&gt;mtd, so we shouldn't perform
strlen(lib-&gt;mtd); this produces a segmentation fault. As this code isn't
used in the legacy codepath, we can just move it down to an 'else' branch.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
