OSDN Git Service

zram: identify asynchronous IO's return value
authorMinchan Kim <minchan@kernel.org>
Wed, 6 Sep 2017 23:20:00 +0000 (16:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 00:27:25 +0000 (17:27 -0700)
commitae85a8075c5b025b9d503554ddc480a346a24536
tree633d5dda845b81d541008af1633412af06242deb
parent1363d4662a0d28dfdb81ef426c88c9a8dbf7c338
zram: identify asynchronous IO's return value

For upcoming asynchronous IO like writeback, zram_rw_page should be
aware of that whether requested IO was completed or submitted
successfully, otherwise error.

For the goal, zram_bvec_rw has three return values.

-errno: returns error number
     0: IO request is done synchronously
     1: IO request is issued successfully.

Link: http://lkml.kernel.org/r/1498459987-24562-7-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Juneho Choi <juno.choi@lge.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/zram/zram_drv.c