git: kernel - Support bdwrite() on tmpfs buffer cache buffers

看板DFBSD_commit作者時間14年前 (2011/12/28 02:05), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 8f9ba07bf8fc82b831f5600141b0b039548764ee Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Wed Dec 7 22:32:33 2011 -0800 kernel - Support bdwrite() on tmpfs buffer cache buffers * tmpfs itself does not call bdwrite() when no swap space has been allocated but certain system side effects such as nvtruncbuf() when a file is truncated CAN cause bdwrite() to be called. This eventually causes the buffer to run through tmpfs's strategy function. * Adjust the strategy function to handle the no-swap case by marking the underlying pages dirty and valid and completing the I/O. * Also handle the case when swap exists but fills up. If the swap_strategy() function fails with ENOMEM fall-back to again marking the pages dirty andvalid and completing the I/O. This allows tmpfs to fill up to the system's total memory+swap instead of just the system's swap. Summary of changes: sys/vfs/tmpfs/tmpfs_vnops.c | 59 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 56 insertions(+), 3 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8f9ba07bf8fc82b831f5600141b0b039548764ee -- DragonFly BSD source repository
文章代碼(AID): #1E-WZCfd (DFBSD_commit)