lkml.org 
[lkml]   [2002]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: swsusp: don't eat ide disks
On Mon, Nov 04 2002, Jens Axboe wrote:
> On Sun, Nov 03 2002, Linus Torvalds wrote:
> > struct request *rq;
> >
> > rq = blk_get_request(q, WRITE, __GFP_WAIT);
> > rq->flags = REQ_BLOCK_PC;
> > rq->data = NULL;
> > rq->data_len = 0;
> > rq->timeout = 5*HZ; /* Or whatever */
> > memset(rq->cmd, 0, sizeof(rq->cmd));
> > rq->cmd[0] = SYNCHRONIZE_CACHE;
> > .. fill in whatever bytes the SYNCHRONIZE_CACHE cmd needs ..
> > rq->cmd_len = 10;
> > err = blk_do_rq(q, bdev, rq);
> > blk_put_request(rq);
>
> Warning, redundant blk_put_request().

Sorry no, I fixed that so the example is fine!

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:1.104 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site