writeback: added support to change the number of writebacks using a sysfs attribute
User can change the number of writeback contexts with values 1 to num
cpus using the new sysfs attribute
echo <num_writbacks> > /sys/class/bdi/<maj>:<min>/nwritebacks
The sequence of operations when number of writebacks is changed :
- fetch the superblock for a bdi
- freezes the filesystem
- iterate through inodes of the superblock and flush the pages
- shutdown and free the writeback threads
- allocate and registter the wb threads
- thaw the filesystem
Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
5 files changed