Changeset 2c6cc3c in rtems for cpukit/libblock


Ignore:
Timestamp:
May 30, 2012, 11:22:08 AM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
73c09b3b
Parents:
40284de
git-author:
Sebastian Huber <sebastian.huber@…> (05/30/12 11:22:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/31/12 09:05:48)
Message:

libblock: Remove explicit bds_per_group parameter

File:
1 edited

Legend:

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

    r40284de r2c6cc3c  
    12371237static rtems_bdbuf_buffer *
    12381238rtems_bdbuf_get_buffer_from_lru_list (const rtems_disk_device *dd,
    1239                                       rtems_blkdev_bnum block,
    1240                                       size_t            bds_per_group)
     1239                                      rtems_blkdev_bnum block)
    12411240{
    12421241  rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
     
    12511250              bd - bdbuf_cache.bds,
    12521251              bd->group - bdbuf_cache.groups, bd->group->users,
    1253               bd->group->bds_per_group, bds_per_group);
     1252              bd->group->bds_per_group, dd->bds_per_group);
    12541253
    12551254    /*
     
    12581257    if (bd->waiters == 0)
    12591258    {
    1260       if (bd->group->bds_per_group == bds_per_group)
     1259      if (bd->group->bds_per_group == dd->bds_per_group)
    12611260      {
    12621261        rtems_bdbuf_remove_from_tree_and_lru_list (bd);
     
    12651264      }
    12661265      else if (bd->group->users == 0)
    1267         empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
     1266        empty_bd = rtems_bdbuf_group_realloc (bd->group, dd->bds_per_group);
    12681267    }
    12691268
     
    16891688static rtems_bdbuf_buffer *
    16901689rtems_bdbuf_get_buffer_for_read_ahead (const rtems_disk_device *dd,
    1691                                        rtems_blkdev_bnum block,
    1692                                        size_t            bds_per_group)
     1690                                       rtems_blkdev_bnum block)
    16931691{
    16941692  rtems_bdbuf_buffer *bd = NULL;
     
    16981696  if (bd == NULL)
    16991697  {
    1700     bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block, bds_per_group);
     1698    bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
    17011699
    17021700    if (bd != NULL)
     
    17151713static rtems_bdbuf_buffer *
    17161714rtems_bdbuf_get_buffer_for_access (const rtems_disk_device *dd,
    1717                                    rtems_blkdev_bnum block,
    1718                                    size_t            bds_per_group)
     1715                                   rtems_blkdev_bnum block)
    17191716{
    17201717  rtems_bdbuf_buffer *bd = NULL;
     
    17261723    if (bd != NULL)
    17271724    {
    1728       if (bd->group->bds_per_group != bds_per_group)
     1725      if (bd->group->bds_per_group != dd->bds_per_group)
    17291726      {
    17301727        if (rtems_bdbuf_wait_for_recycle (bd))
     
    17391736    else
    17401737    {
    1741       bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block, bds_per_group);
     1738      bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
    17421739
    17431740      if (bd == NULL)
     
    17961793            media_block, block, (unsigned) dd->dev);
    17971794
    1798   bd = rtems_bdbuf_get_buffer_for_access (dd, media_block, dd->bds_per_group);
     1795  bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
    17991796
    18001797  switch (bd->state)
     
    18561853rtems_bdbuf_create_read_request (const rtems_disk_device *dd,
    18571854                                 rtems_blkdev_bnum        media_block,
    1858                                  size_t                   bds_per_group,
    18591855                                 rtems_blkdev_request    *req,
    18601856                                 rtems_bdbuf_buffer     **bd_ptr)
     
    18791875  req->bufnum = 0;
    18801876
    1881   bd = rtems_bdbuf_get_buffer_for_access (dd, media_block, bds_per_group);
     1877  bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
    18821878
    18831879  *bd_ptr = bd;
     
    19081904    media_block += media_block_count;
    19091905
    1910     bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block,
    1911                                                 bds_per_group);
     1906    bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
    19121907
    19131908    if (bd == NULL)
     
    20202015
    20212016  rtems_bdbuf_lock_cache ();
    2022   rtems_bdbuf_create_read_request (dd, media_block, dd->bds_per_group, req, &bd);
     2017  rtems_bdbuf_create_read_request (dd, media_block, req, &bd);
    20232018
    20242019  if (req->bufnum > 0)
Note: See TracChangeset for help on using the changeset viewer.