64-bit bdev position

Change-Id: I149693624610e04af0c5e4437b5efa484a33467d
This commit is contained in:
Ben Gras
2014-02-24 14:22:04 +01:00
committed by Lionel Sambuc
parent d1cfa0acd0
commit 3c7f4e462e
9 changed files with 24 additions and 31 deletions

View File

@@ -135,8 +135,7 @@ static int bdev_rdwt_setup(int req, dev_t dev, u64_t pos, char *buf,
memset(m, 0, sizeof(*m));
m->m_type = req;
m->BDEV_MINOR = minor(dev);
m->BDEV_POS_LO = ex64lo(pos);
m->BDEV_POS_HI = ex64hi(pos);
m->BDEV_POS = pos;
m->BDEV_COUNT = count;
m->BDEV_GRANT = grant;
m->BDEV_FLAGS = flags;
@@ -227,8 +226,7 @@ static int bdev_vrdwt_setup(int req, dev_t dev, u64_t pos, iovec_t *vec,
memset(m, 0, sizeof(*m));
m->m_type = req;
m->BDEV_MINOR = minor(dev);
m->BDEV_POS_LO = ex64lo(pos);
m->BDEV_POS_HI = ex64hi(pos);
m->BDEV_POS = pos;
m->BDEV_COUNT = count;
m->BDEV_GRANT = grant;
m->BDEV_FLAGS = flags;
@@ -605,7 +603,7 @@ int bdev_restart_asyn(bdev_call_t *call)
bdev_rdwt_cleanup(&call->msg);
r = bdev_rdwt_setup(type, call->dev,
make64(call->msg.BDEV_POS_LO, call->msg.BDEV_POS_HI),
call->msg.BDEV_POS,
(char *) call->vec[0].iov_addr, call->msg.BDEV_COUNT,
call->msg.BDEV_FLAGS, &call->msg);
@@ -616,7 +614,7 @@ int bdev_restart_asyn(bdev_call_t *call)
bdev_vrdwt_cleanup(&call->msg, call->gvec);
r = bdev_vrdwt_setup(type, call->dev,
make64(call->msg.BDEV_POS_LO, call->msg.BDEV_POS_HI),
call->msg.BDEV_POS,
call->vec, call->msg.BDEV_COUNT, call->msg.BDEV_FLAGS,
&call->msg, call->gvec);

View File

@@ -4,19 +4,19 @@
* Field names are prefixed with BDEV_. Separate field names are used for the
* "access", "request", and "user" fields.
*
* m_type MINOR COUNT GRANT FLAGS ID POS_LO POS_HI
* m_type MINOR COUNT GRANT FLAGS ID REQUEST POS
* +--------------+--------+----------+-------+-------+------+---------+------+
* | BDEV_OPEN | minor | access | | | id | | |
* |--------------+--------+----------+-------+-------+------+---------+------|
* | BDEV_CLOSE | minor | | | | id | | |
* |--------------+--------+----------+-------+-------+------+---------+------|
* | BDEV_READ | minor | bytes | grant | flags | id | position |
* | BDEV_READ | minor | bytes | grant | flags | id | | pos. |
* |--------------+--------+----------+-------+-------+------+---------+------|
* | BDEV_WRITE | minor | bytes | grant | flags | id | position |
* | BDEV_WRITE | minor | bytes | grant | flags | id | | pos. |
* |--------------+--------+----------+-------+-------+------+---------+------|
* | BDEV_GATHER | minor | elements | grant | flags | id | position |
* | BDEV_GATHER | minor | elements | grant | flags | id | | pos. |
* |--------------+--------+----------+-------+-------+------+---------+------|
* | BDEV_SCATTER | minor | elements | grant | flags | id | position |
* | BDEV_SCATTER | minor | elements | grant | flags | id | | pos. |
* |--------------+--------+----------+-------+-------+------+---------+------|
* | BDEV_IOCTL | minor | | grant | user | id | request | |
* ----------------------------------------------------------------------------
@@ -207,7 +207,7 @@ static int do_rdwt(struct blockdriver *bdp, message *mp)
/* Transfer bytes from/to the device. */
do_write = (mp->m_type == BDEV_WRITE);
position = make64(mp->BDEV_POS_LO, mp->BDEV_POS_HI);
position = mp->BDEV_POS;
r = (*bdp->bdr_transfer)(mp->BDEV_MINOR, do_write, position, mp->m_source,
&iovec1, 1, mp->BDEV_FLAGS);
@@ -248,7 +248,7 @@ static int do_vrdwt(struct blockdriver *bdp, message *mp, thread_id_t id)
/* Transfer bytes from/to the device. */
do_write = (mp->m_type == BDEV_SCATTER);
position = make64(mp->BDEV_POS_LO, mp->BDEV_POS_HI);
position = mp->BDEV_POS;
r = (*bdp->bdr_transfer)(mp->BDEV_MINOR, do_write, position, mp->m_source,
iovec, nr_req, mp->BDEV_FLAGS);

View File

@@ -205,7 +205,7 @@ void trace_start(thread_id_t id, message *m_ptr)
case BDEV_WRITE:
case BDEV_GATHER:
case BDEV_SCATTER:
pos = make64(m_ptr->BDEV_POS_LO, m_ptr->BDEV_POS_HI);
pos = m_ptr->BDEV_POS;
size = m_ptr->BDEV_COUNT;
flags = m_ptr->BDEV_FLAGS;