<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/mtd/devices/block2mtd.c, branch v3.10.78</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>mtd: block2mtd: throttle writes by calling balance_dirty_pages_ratelimited.</title>
<updated>2012-12-13T11:39:44+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-12-12T08:32:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=031da73fca29ebba3eea5a512746e01d52e542cd'/>
<id>031da73fca29ebba3eea5a512746e01d52e542cd</id>
<content type='text'>
If you create a block2mtd device that is larger than main memory,
and write to all of it, then lots of pages will be dirtied but
they will never be flushed out as nothing calls any variant of
balance_dirty_pages.

It would be nice to call set_page_dirty_balance(), but that isn't exported,
so just call balance_dirty_pages_ratelimited() directly.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you create a block2mtd device that is larger than main memory,
and write to all of it, then lots of pages will be dirtied but
they will never be flushed out as nothing calls any variant of
balance_dirty_pages.

It would be nice to call set_page_dirty_balance(), but that isn't exported,
so just call balance_dirty_pages_ratelimited() directly.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: remove use of __devexit</title>
<updated>2012-11-22T10:07:03+00:00</updated>
<author>
<name>Bill Pemberton</name>
<email>wfp5p@virginia.edu</email>
</author>
<published>2012-11-19T18:26:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=810b7e060c14110d8f580daaf77fab3a7d950483'/>
<id>810b7e060c14110d8f580daaf77fab3a7d950483</id>
<content type='text'>
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: block2mtd: fix recursive call of mtd_writev</title>
<updated>2012-06-01T19:23:19+00:00</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2012-05-23T22:17:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e24e32e2759348c9290404abad4f729f791bfad'/>
<id>2e24e32e2759348c9290404abad4f729f791bfad</id>
<content type='text'>
The 'mtd_writev' interface calls the function assigned
to the '_write' field of a given mtd device if that is
not NULL. The block2mtd driver sets the '_writev' field
to the 'mtd_writev' function itself and thus causes a
endless loop.

This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900
(mtd: harmonize mtd_writev usage).

Remove the assignment from the block2mtd driver to fix the
issue.

Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Cc: stable@kernel.org [3.3+]
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'mtd_writev' interface calls the function assigned
to the '_write' field of a given mtd device if that is
not NULL. The block2mtd driver sets the '_writev' field
to the 'mtd_writev' function itself and thus causes a
endless loop.

This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900
(mtd: harmonize mtd_writev usage).

Remove the assignment from the block2mtd driver to fix the
issue.

Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Cc: stable@kernel.org [3.3+]
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: block2mtd: page_read() never returns NULL</title>
<updated>2012-05-14T03:56:52+00:00</updated>
<author>
<name>Ryosuke Saito</name>
<email>raitosyo@gmail.com</email>
</author>
<published>2012-04-23T10:47:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39a5d0b93c244f40ee2e1502e4870685b7dcc1fa'/>
<id>39a5d0b93c244f40ee2e1502e4870685b7dcc1fa</id>
<content type='text'>
page_read() never returns NULL, so we can remove the NULL check here.

Signed-off-by: Ryosuke Saito &lt;raitosyo@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
page_read() never returns NULL, so we can remove the NULL check here.

Signed-off-by: Ryosuke Saito &lt;raitosyo@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: move zero length verification to MTD API functions</title>
<updated>2012-03-26T23:32:19+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-02-06T11:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bcb1d238716d138c9e16347fc32b3c1ae006339e'/>
<id>bcb1d238716d138c9e16347fc32b3c1ae006339e</id>
<content type='text'>
In many places in drivers we verify for the zero length, but this is very
inconsistent across drivers. This is obviously the right thing to do, though.
This patch moves the check to the MTD API functions instead and removes a lot
of duplication.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Reviewed-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many places in drivers we verify for the zero length, but this is very
inconsistent across drivers. This is obviously the right thing to do, though.
This patch moves the check to the MTD API functions instead and removes a lot
of duplication.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Reviewed-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: remove retlen zeroing duplication</title>
<updated>2012-03-26T23:29:34+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-02-06T10:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=834247ec7e281dee839fe4a04bc1bbf0c7395172'/>
<id>834247ec7e281dee839fe4a04bc1bbf0c7395172</id>
<content type='text'>
The MTD API function now zero the 'retlen' parameter before calling
the driver's method — do not do this again in drivers. This removes
duplicated '*retlen = 0' assignent from the following methods:

    'mtd_point()'
    'mtd_read()'
    'mtd_write()'
    'mtd_writev()'
    'mtd_panic_write()'

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MTD API function now zero the 'retlen' parameter before calling
the driver's method — do not do this again in drivers. This removes
duplicated '*retlen = 0' assignent from the following methods:

    'mtd_point()'
    'mtd_read()'
    'mtd_write()'
    'mtd_writev()'
    'mtd_panic_write()'

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: do not duplicate length and offset checks in drivers</title>
<updated>2012-03-26T23:28:18+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-02-03T14:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5def48982b778aaebe201f85af7170b7d0a6619f'/>
<id>5def48982b778aaebe201f85af7170b7d0a6619f</id>
<content type='text'>
We already verify that offset and length are within the MTD device size
in the MTD API functions. Let's remove the duplicated checks in drivers.
This patch only affects the following API's:

'mtd_erase()'
'mtd_point()'
'mtd_unpoint()'
'mtd_get_unmapped_area()'
'mtd_read()'
'mtd_write()'
'mtd_panic_write()'
'mtd_lock()'
'mtd_unlock()'
'mtd_is_locked()'
'mtd_block_isbad()'
'mtd_block_markbad()'

This patch adds a bit of noise by removing too sparse empty lines, but this is
not too bad.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already verify that offset and length are within the MTD device size
in the MTD API functions. Let's remove the duplicated checks in drivers.
This patch only affects the following API's:

'mtd_erase()'
'mtd_point()'
'mtd_unpoint()'
'mtd_get_unmapped_area()'
'mtd_read()'
'mtd_write()'
'mtd_panic_write()'
'mtd_lock()'
'mtd_unlock()'
'mtd_is_locked()'
'mtd_block_isbad()'
'mtd_block_markbad()'

This patch adds a bit of noise by removing too sparse empty lines, but this is
not too bad.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: block2mtd: initialize writebufsize</title>
<updated>2012-03-26T23:22:14+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-02-03T07:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b604387411ec6a072e95910099262616edd2bd2f'/>
<id>b604387411ec6a072e95910099262616edd2bd2f</id>
<content type='text'>
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

However, we forgot to set this parameter for block2mtd. Set it to PAGE_SIZE
because this is actually the amount of data we write at a time.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Acked-by: Joern Engel &lt;joern@lazybastard.org&gt;
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

However, we forgot to set this parameter for block2mtd. Set it to PAGE_SIZE
because this is actually the amount of data we write at a time.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Acked-by: Joern Engel &lt;joern@lazybastard.org&gt;
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: add leading underscore to all mtd functions</title>
<updated>2012-03-26T23:20:01+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-01-30T12:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c3c10bba1e4ccb75b41442e45c1a072f6cded19'/>
<id>3c3c10bba1e4ccb75b41442e45c1a072f6cded19</id>
<content type='text'>
This patch renames all MTD functions by adding a "_" prefix:

mtd-&gt;erase -&gt; mtd-&gt;_erase
mtd-&gt;read_oob -&gt; mtd-&gt;_read_oob
...

The reason is that we are re-working the MTD API and from now on it is
an error to use MTD function pointers directly - we have a corresponding
API call for every pointer. By adding a leading "_" we achieve the following:

1. Make sure we convert every direct pointer users
2. A leading "_" suggests that this interface is internal and it becomes
   less likely that people will use them directly
3. Make sure all the out-of-tree modules stop compiling and the owners
   spot the big API change and amend them.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch renames all MTD functions by adding a "_" prefix:

mtd-&gt;erase -&gt; mtd-&gt;_erase
mtd-&gt;read_oob -&gt; mtd-&gt;_read_oob
...

The reason is that we are re-working the MTD API and from now on it is
an error to use MTD function pointers directly - we have a corresponding
API call for every pointer. By adding a leading "_" we achieve the following:

1. Make sure we convert every direct pointer users
2. A leading "_" suggests that this interface is internal and it becomes
   less likely that people will use them directly
3. Make sure all the out-of-tree modules stop compiling and the owners
   spot the big API change and amend them.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-3.3' of git://git.infradead.org/mtd-2.6</title>
<updated>2012-01-10T21:45:22+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-10T21:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b3480f8b701170c046e1ed362946f5f0d005e13'/>
<id>7b3480f8b701170c046e1ed362946f5f0d005e13</id>
<content type='text'>
MTD pull for 3.3

* tag 'for-linus-3.3' of git://git.infradead.org/mtd-2.6: (113 commits)
  mtd: Fix dependency for MTD_DOC200x
  mtd: do not use mtd-&gt;block_markbad directly
  logfs: do not use 'mtd-&gt;block_isbad' directly
  mtd: introduce mtd_can_have_bb helper
  mtd: do not use mtd-&gt;suspend and mtd-&gt;resume directly
  mtd: do not use mtd-&gt;lock, unlock and is_locked directly
  mtd: do not use mtd-&gt;sync directly
  mtd: harmonize mtd_writev usage
  mtd: do not use mtd-&gt;lock_user_prot_reg directly
  mtd: mtd-&gt;write_user_prot_reg directly
  mtd: do not use mtd-&gt;read_*_prot_reg directly
  mtd: do not use mtd-&gt;get_*_prot_info directly
  mtd: do not use mtd-&gt;read_oob directly
  mtd: mtdoops: do not use mtd-&gt;panic_write directly
  romfs: do not use mtd-&gt;get_unmapped_area directly
  mtd: do not use mtd-&gt;get_unmapped_area directly
  mtd: do use mtd-&gt;point directly
  mtd: introduce mtd_has_oob helper
  mtd: mtdcore: export symbols cleanup
  mtd: clean-up the default_mtd_writev function
  ...

Fix up trivial edit/remove conflict in drivers/staging/spectra/lld_mtd.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MTD pull for 3.3

* tag 'for-linus-3.3' of git://git.infradead.org/mtd-2.6: (113 commits)
  mtd: Fix dependency for MTD_DOC200x
  mtd: do not use mtd-&gt;block_markbad directly
  logfs: do not use 'mtd-&gt;block_isbad' directly
  mtd: introduce mtd_can_have_bb helper
  mtd: do not use mtd-&gt;suspend and mtd-&gt;resume directly
  mtd: do not use mtd-&gt;lock, unlock and is_locked directly
  mtd: do not use mtd-&gt;sync directly
  mtd: harmonize mtd_writev usage
  mtd: do not use mtd-&gt;lock_user_prot_reg directly
  mtd: mtd-&gt;write_user_prot_reg directly
  mtd: do not use mtd-&gt;read_*_prot_reg directly
  mtd: do not use mtd-&gt;get_*_prot_info directly
  mtd: do not use mtd-&gt;read_oob directly
  mtd: mtdoops: do not use mtd-&gt;panic_write directly
  romfs: do not use mtd-&gt;get_unmapped_area directly
  mtd: do not use mtd-&gt;get_unmapped_area directly
  mtd: do use mtd-&gt;point directly
  mtd: introduce mtd_has_oob helper
  mtd: mtdcore: export symbols cleanup
  mtd: clean-up the default_mtd_writev function
  ...

Fix up trivial edit/remove conflict in drivers/staging/spectra/lld_mtd.c
</pre>
</div>
</content>
</entry>
</feed>
