aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorJoonsoo Kim <[email protected]>2014-04-07 22:38:24 +0000
committerLinus Torvalds <[email protected]>2014-04-07 23:36:02 +0000
commitf4659d8e620d08bd1a84a8aec5d2f5294a242764 (patch)
tree28490e0ad7668095e600abec488397c78cf00782 /fs/proc/array.c
parentzram: use scnprintf() in attrs show() methods (diff)
downloadkernel-f4659d8e620d08bd1a84a8aec5d2f5294a242764.tar.gz
kernel-f4659d8e620d08bd1a84a8aec5d2f5294a242764.zip
zram: support REQ_DISCARD
zram is ram based block device and can be used by backend of filesystem. When filesystem deletes a file, it normally doesn't do anything on data block of that file. It just marks on metadata of that file. This behavior has no problem on disk based block device, but has problems on ram based block device, since we can't free memory used for data block. To overcome this disadvantage, there is REQ_DISCARD functionality. If block device support REQ_DISCARD and filesystem is mounted with discard option, filesystem sends REQ_DISCARD to block device whenever some data blocks are discarded. All we have to do is to handle this request. This patch implements to flag up QUEUE_FLAG_DISCARD and handle this REQ_DISCARD request. With it, we can free memory used by zram if it isn't used. [[email protected]: tweak comments] Signed-off-by: Joonsoo Kim <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Jerome Marchand <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions