<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/mg_disk.c, branch v3.0.86</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/block/mg_disk.c?h=v3.0.86</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/block/mg_disk.c?h=v3.0.86'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-08-23T12:02:44Z</updated>
<entry>
<title>block: switch s390 tape_block and mg_disk to elevator_change()</title>
<updated>2010-08-23T12:02:44Z</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-08-23T12:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52cc2eef31587b22ce9fbe77b064a031a9613ab0'/>
<id>urn:sha1:52cc2eef31587b22ce9fbe77b064a031a9613ab0</id>
<content type='text'>
Now that we have this API, switch the two in-kernel users to it.
Resolves an oops introduced by commit
1abec4fdbb142e3ccb6ce99832fae42129134a96.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: remove wrappers for request type/flags</title>
<updated>2010-08-07T16:17:56Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-08-07T16:17:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=33659ebbae262228eef4e0fe990f393d1f0ed941'/>
<id>urn:sha1:33659ebbae262228eef4e0fe990f393d1f0ed941</id>
<content type='text'>
Remove all the trivial wrappers for the cmd_type and cmd_flags fields in
struct requests.  This allows much easier grepping for different request
types instead of unwinding through macros.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectors</title>
<updated>2010-02-26T12:58:08Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2010-02-26T05:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=086fa5ff0854c676ec333760f4c0154b3b242616'/>
<id>urn:sha1:086fa5ff0854c676ec333760f4c0154b3b242616</id>
<content type='text'>
The block layer calling convention is blk_queue_&lt;limit name&gt;.
blk_queue_max_sectors predates this practice, leading to some confusion.
Rename the function to appropriately reflect that its intended use is to
set max_hw_sectors.

Also introduce a temporary wrapper for backwards compability.  This can
be removed after the merge window is closed.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>drivers/block/mg_disk.c: use resource_size()</title>
<updated>2009-12-22T08:12:48Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2009-12-22T00:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e019ef0c4f11a0acb79b89fb1e09c72197b42bbe'/>
<id>urn:sha1:e019ef0c4f11a0acb79b89fb1e09c72197b42bbe</id>
<content type='text'>
Use resource_size() for ioremap.

The ioremap appears to be passing the incorrect size for the platform
resource.  Unfortunately, I can't locate a user in mainline to verify
this.  Using resource_size should be the correct fix.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Acked-by: unsik Kim &lt;donari75@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>const: make block_device_operations const</title>
<updated>2009-09-22T14:17:25Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-09-22T00:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e'/>
<id>urn:sha1:83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mg_disk: Add missing ready status check on mg_write()</title>
<updated>2009-07-28T06:57:33Z</updated>
<author>
<name>unsik Kim</name>
<email>donari75@gmail.com</email>
</author>
<published>2009-07-28T06:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a85a00a699740f6f9863f88aef22060fe1534681'/>
<id>urn:sha1:a85a00a699740f6f9863f88aef22060fe1534681</id>
<content type='text'>
When last sector is written, ready bit of status register should be
checked.

Signed-off-by: unsik Kim &lt;donari75@gmail.com&gt;
Acked-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>mg_disk: fix issue with data integrity on error in mg_write()</title>
<updated>2009-07-28T06:56:34Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-07-28T06:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=394c6cc63c1d6900ad7498a3221a1d48fc00c4fa'/>
<id>urn:sha1:394c6cc63c1d6900ad7498a3221a1d48fc00c4fa</id>
<content type='text'>
We cannot acknowledge the sector write before checking its status
(which is done on the next loop iteration) and we also need to do
the final status register check after writing the last sector.

Fix mg_write() to match mg_write_intr() in this regard.

While at it:
- add mg_read_one() and mg_write_one() helpers
- always use MG_SECTOR_SIZE and remove MG_STORAGE_BUFFER_SIZE

[bart: thanks to Tejun for porting the patch over recent block changes]

Cc: unsik Kim &lt;donari75@gmail.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;

===================================================================
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>mg_disk: fix reading invalid status when use polling driver</title>
<updated>2009-07-28T06:52:07Z</updated>
<author>
<name>unsik Kim</name>
<email>donari75@gmail.com</email>
</author>
<published>2009-07-28T06:52:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb32baec15c38ae6f06cb898a9f791578c5f8c79'/>
<id>urn:sha1:eb32baec15c38ae6f06cb898a9f791578c5f8c79</id>
<content type='text'>
When using polling driver, little delay is required to access
status register. Without this, host might read invalid status.

Signed-off-by: unsik Kim &lt;donari75@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>mg_disk: remove prohibited sleep operation</title>
<updated>2009-07-28T06:52:06Z</updated>
<author>
<name>unsik Kim</name>
<email>donari75@gmail.com</email>
</author>
<published>2009-07-28T06:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48f5690d45b79ffeedc5ab24243b576056f1d2ff'/>
<id>urn:sha1:48f5690d45b79ffeedc5ab24243b576056f1d2ff</id>
<content type='text'>
mflash's polling driver operate in standard request_fn_proc's context,
sleep in this isn't permitted.

Signed-off-by: unsik Kim &lt;donari75@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>
