<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/mm/msync.c, branch v3.10.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/mm/msync.c?h=v3.10.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/mm/msync.c?h=v3.10.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-05-21T22:31:21Z</updated>
<entry>
<title>sanitize vfs_fsync calling conventions</title>
<updated>2010-05-21T22:31:21Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2010-03-22T16:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8018ab057480974e7f26a387bf4ce040e9a5f6f1'/>
<id>urn:sha1:8018ab057480974e7f26a387bf4ce040e9a5f6f1</id>
<content type='text'>
Now that the last user passing a NULL file pointer is gone we can remove
the redundant dentry argument and associated hacks inside vfs_fsynmc_range.

The next step will be removig the dentry argument from -&gt;fsync, but given
the luck with the last round of method prototype changes I'd rather
defer this until after the main merge window.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[CVE-2009-0029] System call wrappers part 13</title>
<updated>2009-01-14T13:15:23Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2009-01-14T13:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a6160a7b5c27b3c38651baef92a14fa7072b3c1'/>
<id>urn:sha1:6a6160a7b5c27b3c38651baef92a14fa7072b3c1</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>add a vfs_fsync helper</title>
<updated>2009-01-05T16:54:28Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2008-12-22T20:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c728ef583b3d82266584da5cb068294c09df31e'/>
<id>urn:sha1:4c728ef583b3d82266584da5cb068294c09df31e</id>
<content type='text'>
Fsync currently has a fdatawrite/fdatawait pair around the method call,
and a mutex_lock/unlock of the inode mutex.  All callers of fsync have
to duplicate this, but we have a few and most of them don't quite get
it right.  This patch adds a new vfs_fsync that takes care of this.
It's a little more complicated as usual as -&gt;fsync might get a NULL file
pointer and just a dentry from nfsd, but otherwise gets afile and we
want to take the mapping and file operations from it when it is there.

Notes on the fsync callers:

 - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
   	lower file
 - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
	file, and returning 0 when -&gt;fsync was missing
 - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
   taking i_mutex.  Now given that shared memory doesn't have disk
   backing not doing anything in fsync seems fine and I left it out of
   the vfs_fsync conversion for now, but in that case we might just
   not pass it through to the lower file at all but just call the no-op
   simple_sync_file directly.

[and now actually export vfs_fsync]

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Detach sched.h from mm.h</title>
<updated>2007-05-21T16:18:19Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2007-05-20T21:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8edc6e03a5c8562dc70a6d969f732bdb355a7e7'/>
<id>urn:sha1:e8edc6e03a5c8562dc70a6d969f732bdb355a7e7</id>
<content type='text'>
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] mm: msync() cleanup</title>
<updated>2006-09-26T15:48:45Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-09-26T06:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=204ec841fbea3e5138168edbc3a76d46747cc987'/>
<id>urn:sha1:204ec841fbea3e5138168edbc3a76d46747cc987</id>
<content type='text'>
With the tracking of dirty pages properly done now, msync doesn't need to scan
the PTEs anymore to determine the dirty status.

From: Hugh Dickins &lt;hugh@veritas.com&gt;

In looking to do that, I made some other tidyups: can remove several
#includes, and sys_msync loop termination not quite right.

Most of those points are criticisms of the existing sys_msync, not of your
patch.  In particular, the loop termination errors were introduced in 2.6.17:
I did notice this shortly before it came out, but decided I was more likely to
get it wrong myself, and make matters worse if I tried to rush a last-minute
fix in.  And it's not terribly likely to go wrong, nor disastrous if it does
go wrong (may miss reporting an unmapped area; may also fsync file of a
following vma).

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Kill PF_SYNCWRITE flag</title>
<updated>2006-06-23T15:10:39Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@suse.de</email>
</author>
<published>2006-06-13T06:26:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b31dc66a54ad986b6b73bdc49c8efc17cbad1833'/>
<id>urn:sha1:b31dc66a54ad986b6b73bdc49c8efc17cbad1833</id>
<content type='text'>
A process flag to indicate whether we are doing sync io is incredibly
ugly. It also causes performance problems when one does a lot of async
io and then proceeds to sync it. Part of the io will go out as async,
and the other part as sync. This causes a disconnect between the
previously submitted io and the synced io. For io schedulers such as CFQ,
this will cause us lost merges and suboptimal behaviour in scheduling.

Remove PF_SYNCWRITE completely from the fsync/msync paths, and let
the O_DIRECT path just directly indicate that the writes are sync
by using WRITE_SYNC instead.

Signed-off-by: Jens Axboe &lt;axboe@suse.de&gt;
</content>
</entry>
<entry>
<title>The comment describing how MS_ASYNC works in msync.c is confusing</title>
<updated>2006-03-24T17:30:53Z</updated>
<author>
<name>Amos Waterland</name>
<email>apw@us.ibm.com</email>
</author>
<published>2006-03-24T17:30:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16538c40776b8be6b0f23966e08fdc7b8fff823f'/>
<id>urn:sha1:16538c40776b8be6b0f23966e08fdc7b8fff823f</id>
<content type='text'>
because of a typo.  This patch just changes "my" to "by", which I
believe was the original intent.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] msync(): use do_fsync()</title>
<updated>2006-03-24T15:33:27Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-03-24T11:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f2e9f157a94f444dad974b088b853ac40785b02'/>
<id>urn:sha1:8f2e9f157a94f444dad974b088b853ac40785b02</id>
<content type='text'>
No need to duplicate all that code.

Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] msync: fix return value</title>
<updated>2006-03-24T15:33:26Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-03-24T11:18:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=676758bdb7bfca8413a85203921746f446e237be'/>
<id>urn:sha1:676758bdb7bfca8413a85203921746f446e237be</id>
<content type='text'>
msync() does a strange thing.  Essentially:

	vma = find_vma();
	for ( ; ; ) {
		if (!vma)
			return -ENOMEM;
		...
		vma = vma-&gt;vm_next;
	}

so an msync() request which starts within or before a valid VMA and which ends
within or beyond the final VMA will incorrectly return -ENOMEM.

Fix.

Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] msync(MS_SYNC): don't hold mmap_sem while syncing</title>
<updated>2006-03-24T15:33:26Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-03-24T11:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=707c21c848deeb0200ba3f07e4ba90e6dc419c2f'/>
<id>urn:sha1:707c21c848deeb0200ba3f07e4ba90e6dc419c2f</id>
<content type='text'>
It seems bad to hold mmap_sem while performing synchronous disk I/O.  Alter
the msync(MS_SYNC) code so that the lock is released while we sync the file.

Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
