Re: forcing write-back from FS - again

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Artem Bityutskiy <dedekind@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, October 22, 2007 - 5:05 am

On Mon, 22 Oct 2007 11:52:33 +0300 Artem Bityutskiy <dedekind@yandex.ru> wrote:


It would be simpler/safer/saner to add a new bitflag to writeback_control
and use that directly.  The WB_SYNC_foo flags are a holdover from an
earlier time and really should be made to go away, in favour of directly
setting up an appropriate writeback_control.



Well it might lose its dirty tag, if the thread which has a lock on the
page is about to write it out or truncate it.  But that shouldn't concern
you here.

The code you have there looks racy: if someone else locks the page in that
little window after the PageLocked() test we'll still block in lock_page().
 That's unlikely to happen in your application (apart from a remaining
ab/ba scenario) but we should make it robust:

	if (wbc->skip_locked_pages) {
		if (TestSetPageLocked(page))
			continue;
	} else {
		lock_page(page);
	}


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
forcing write-back from FS - again, Artem Bityutskiy, (Sun Oct 21, 4:19 pm)
Re: forcing write-back from FS - again, Andrew Morton, (Sun Oct 21, 4:55 pm)
Re: forcing write-back from FS - again, Artem Bityutskiy, (Mon Oct 22, 4:52 am)
Re: forcing write-back from FS - again, Andrew Morton, (Mon Oct 22, 5:05 am)
Re: forcing write-back from FS - again, Artem Bityutskiy, (Mon Oct 22, 5:38 am)
Re: forcing write-back from FS - again, Andrew Morton, (Mon Oct 22, 5:55 am)
Re: forcing write-back from FS - again, Artem Bityutskiy, (Mon Oct 22, 6:04 am)