• Chao Yu's avatar
    f2fs: wrap discard policy · ecc9aa00
    Chao Yu authored
    This patch wraps scattered optional parameters into discard policy as
    below, later, with it we expect that we can adjust these parameters with
    proper strategy in different scenario.
    
    struct discard_policy {
    	unsigned int min_interval;	/* used for candidates exist */
    	unsigned int max_interval;	/* used for candidates not exist */
    	unsigned int max_requests;	/* # of discards issued per round */
    	unsigned int io_aware_gran;	/* minimum granularity discard not be aware of I/O */
    	bool io_aware;			/* issue discard in idle time */
    	bool sync;			/* submit discard with REQ_SYNC flag */
    };
    
    This patch doesn't change any logic of codes.
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    ecc9aa00
f2fs.h 94 KB