Why doesn't rtems_blkdev_sg_buffer have next pointer?

Chan Kim ckim at etri.re.kr
Thu Jun 18 12:16:44 UTC 2015


Hi all,

I have a basic question. 
in rtems 4.10.99 version, I see in cpukit/libblock/include/rtems/blkdev.h,
-------------------------------------
typedef struct rtems_blkdev_sg_buffer {
rtems_blkdev_bnum block;             // this seems to be the start block number of this access
uint32_t length;
void *buffer;
void *user;
} rtems_blkdev_sg_buffer;

typedef struct rtems_blkdev_request {
  rtems_blkdev_request_op req;
  rtems_blkdev_request_cb done;
  void *done_arg;
  rtems_status_code status;
  uint32_t bufnum;                       // this seems to be # of blocks
  rtems_id io_task;
  rtems_blkdev_sg_buffer        bufs[0];
} rtems_blkdev_request;
---------------------------------------

the rtems_blkdev_request has only a single entry of rtems_blkdev_sg_buffer. But usually scatter-list uses next pointer to link buffers in host memory together. But in rtems, why isn't there such link field? Does the block device request I/O with only a single buffer always?
Could somebody please answer to this question?
regards,

Chan Kim


More information about the users mailing list