Changeset f12249f in rtems


Ignore:
Timestamp:
Jul 2, 2012, 1:08:08 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
f29d969
Parents:
828f946
git-author:
Sebastian Huber <sebastian.huber@…> (07/02/12 13:08:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/02/12 14:15:54)
Message:

libblock: Fix continuous blocks write request

Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdbuf.c

    r828f946 rf12249f  
    22972297    uint32_t last_block = 0;
    22982298
    2299     /*
    2300      * Number of buffers per bd. This is used to detect the next
    2301      * block.
    2302      */
    2303     uint32_t bufs_per_bd = 0;
    2304 
    23052299    rtems_disk_device *dd = transfer->dd;
    2306 
    2307     bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
     2300    uint32_t media_blocks_per_block = dd->media_blocks_per_block;
     2301    bool need_continuous_blocks =
     2302      (dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
    23082303
    23092304    /*
     
    23342329        printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
    23352330                bd->block, transfer->write_req->bufnum,
    2336                 dd->phys_dev->capabilities &
    2337                 RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
    2338 
    2339       if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
    2340           transfer->write_req->bufnum &&
    2341           (bd->block != (last_block + bufs_per_bd)))
     2331                need_continuous_blocks ? "MULTI" : "SCAT");
     2332
     2333      if (need_continuous_blocks && transfer->write_req->bufnum &&
     2334          bd->block != last_block + media_blocks_per_block)
    23422335      {
    23432336        rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
  • testsuites/libtests/Makefile.am

    r828f946 rf12249f  
    22
    33SUBDIRS = POSIX
     4SUBDIRS += block15
    45SUBDIRS += block14
    56SUBDIRS += block13
  • testsuites/libtests/configure.ac

    r828f946 rf12249f  
    4242# Explicitly list all Makefiles here
    4343AC_CONFIG_FILES([Makefile
     44block15/Makefile
    4445block14/Makefile
    4546block13/Makefile
Note: See TracChangeset for help on using the changeset viewer.