Home
last modified time | relevance | path

Searched refs:disksize (Results 1 – 4 of 4) sorted by relevance

/drivers/staging/zram/
Dzram.txt27 Set disk size by writing the value to sysfs node 'disksize'
28 (in bytes). If disksize is not given, default value of 25%
31 # Initialize /dev/zram0 with 50MB disksize
32 echo $((50*1024*1024)) > /sys/block/zram0/disksize
34 NOTE: disksize cannot be changed if the disk contains any
36 before you can change its disksize.
48 disksize
Dzram_sysfs.c51 return sprintf(buf, "%llu\n", zram->disksize); in disksize_show()
58 u64 disksize; in disksize_store() local
61 ret = kstrtoull(buf, 10, &disksize); in disksize_store()
72 zram->disksize = PAGE_ALIGN(disksize); in disksize_store()
73 set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT); in disksize_store()
197 static DEVICE_ATTR(disksize, S_IRUGO | S_IWUSR,
Dzram_drv.c109 if (!zram->disksize) { in zram_set_disksize()
115 zram->disksize = default_disksize_perc_ram * in zram_set_disksize()
119 if (zram->disksize > 2 * (totalram_bytes)) { in zram_set_disksize()
129 totalram_bytes >> 10, zram->disksize in zram_set_disksize()
133 zram->disksize &= PAGE_MASK; in zram_set_disksize()
539 (bio->bi_sector >= (zram->disksize >> SECTOR_SHIFT)) || in valid_io_request()
594 for (index = 0; index < zram->disksize >> PAGE_SHIFT; index++) { in __zram_reset_device()
614 zram->disksize = 0; in __zram_reset_device()
653 num_pages = zram->disksize >> PAGE_SHIFT; in zram_init_device()
661 set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT); in zram_init_device()
[all …]
Dzram_drv.h121 u64 disksize; /* bytes */ member