Commit Graph

12810 Commits

Author SHA1 Message Date
Michael Kerrisk a727d7cc36 madvise.2: Minor fixups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 5575818dbf madvise.2: Minor change: reorder some paragraphs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk deb9964960 madvise.2: Tweaks to Jan Chaloupka's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Jan Chaloupka f7282b7bbf madvise.2: Starting with Linux 3.5, more file systems support MADV_REMOVE
As from upstream commit:

commit 3f31d07571eeea18a7d34db9af21d2285b807a17
Author: Hugh Dickins <hughd@google.com>
Date:   Tue May 29 15:06:40 2012 -0700

     mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE

     Now tmpfs supports hole-punching via fallocate(), switch madvise_remove()
     to use do_fallocate() instead of vmtruncate_range(): which extends
     madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs.

madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs.

bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294

Justification from Rafael Aquini:
Well, that code is committed in kernel since v3.5 (2012) and it
surely is the expected behaviour since. It seems to me that
madvise(2) man page text for MADV_REMOVE just got out-of-date in
that regard.

This patch mentions this support in madvise.2 man page.

Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you.

Signed-off-by: Jan Chaloupka <jchaloup@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk bc6eb5efef madvise.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 49170db521 madvise.2: Explain MADV_REMOVE in terms of file hole punching
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk c73c7130f7 madvise.2: Note that madvise() is nonstandard, but widespread
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 35187e77e7 madvise.2: srcfix: remove FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 96d4e25250 madvise.2: Clarify that MADV_DONTNEED has effect on pages only if it succeeds
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 9c0b66ebde madvise.2: ERRORS: add EPERM error case for MADV_HWPOISON
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 7208ad0a3d madvise.2: MADV_REMOVE can be applied only to shared writable mappings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 4335648dd1 madvise.2: MADV_REMOVE cannot be applied to locked or Huge TLB pages
See mm/madvise.c::madvise_remove()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk aeb0944caa madvise.2: MADV_DONTNEED cannot be applied to Huge TLB or locked pages
See mm/madvise.c::madvise_dontneed()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk a0c69e52d5 madvise.2: Note Huge TLB as a cause of EINVAL for MADV_DONTNEED
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 5c5df6bf9b madvise.2: Remove mention of "shared pages" as a cause of EINVAL for MADV_DONTNEED
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk ac95034e8a madvise.2: Split EINVAL error into separate cases
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 845c8bea2d madvise.2: Recast discussion of 'advice' into two groups of values
madvise() is one of those system calls that has congealed over
time, as has the man page. It's helpful to split the discussion
of 'advice' into those flags into two groups:

* Those flags that are (1) widespread across implementations;
  (2) have counterparts in posix_madvise(3); and (3) were present
  in the initial Linux madvise implementation.
* The rest, which are values that (1) may not have counterparts
  in other implementations; (2) have no counterparts in
  posix_madvise(3); and (3) were added to Linux in more recent
  times.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk bdfe6b8f8e madvise.2: Remove "POSIX.1b" from CONFORMING TO
I can find no evidence that madvise() was in POSIX.1b.
Certainly, it's not mentioned in Bill Gallmeister's
POSIX.4 book (O'Reilly).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk c608a033d9 madvise.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk b4c1dae966 madvise.2: Move mention of posix_fadvise() from CONFORMING TO to SEE ALSO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 05fde7dd42 madvise.2: Mention POSIX.1-2008 addition of POSIX_MADV_NOREUSE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 90f406fb12 madvise.2: ffix: Add some paragraph breaks in descriptions of 'advice'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk b7bc9bfd17 madvise.2: Explicitly list the five flags provided by posix_fadvise()
Over time, bit rot has afflicted this page. Since the original
text was written many new Linux-specific flags have been added.
So, now it's better to explicitly list the flags that
correspond to the POSIX analog of madvise().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 498f9213f3 madvise.2: srcfix: add commit hashes for various flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk d4e320965d ioctl_fat.2: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Heinrich Schuchardt 432cdf0d7c ioctl_fat.2: d_ino, d_off, return value explained
The fields d_ino and d_off of structure __fat_dirent are explained.

The different return values of VFAT_IOCTL_READDIR_BOTH and
VFAT_IOCTL_READDIR_SHORT are explained.

The usage of the return value in the example is corrected.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 3b4f95709f ioctl_fat.2: Use "exit()" rather than "return" to terminate main()
For consistency with other pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 3a6b94457d ioctl_fat.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 11a86b155d ioctl_fat.2: Tweak some pieces in EXAMPLE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 3289445e96 ioctl_fat.2: Add kernel version numbers for some ioctl() commands
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk f54da10e44 ioctl_fat.2: Tweaks to Heinrich's new page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 68232827ac ioctl.2: SEE ALSO: add ioctl_fat(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk eeed01713b ioctl_fat.2: Rename from ioctl-fat.2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Heinrich Schuchardt a1cd6a8ff6 ioctl-fat.2: New man page for the ioctl(2) FAT API
The ioctl(2) system call may be used to retrieve information about
the FAT file system and to set file attributes.

Signed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 6da93ae616 modify_ldt.2: Minor fixups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Andy Lutomirski f89f50fa38 modify_ldt.2: Clarify the lm bit's behavior
The lm bit should never have existed in the first place.  Sigh.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk ed26cc5a2e set_thread_area.2: Tweaks after feedback from Andy Lutomirski
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk ef8db991f1 arch_prctl.2: Tweaks after feedback from Andy Lutomirski
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk c79a3031bb modify_ldt.2: Tweaks after feedback from Andy Lutomirski
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 520789667e set_thread_area.2: Various fixes for Andy Lutomirski's patch
Notably, various info about get_thread_area() got dropped
during the merge of the two pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 5c3f9e21f1 arch_prctl.2: Minor tweaks to Andy Lutomirski's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 7acf749e4f modify_ldt.2: Minor tweaks to Andy Lutomirski's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Andy Lutomirski 14620a2531 arch_prctl.2, set_thread_area.2, get_thread_area.2: Improve TLS documentation
The documentation for set_thread_area was very vague.  This
improves it, accounts for recent kernel changes, and merges
it with get_thread_area.2.

get_thread_area.2 now becomes a link.

While I'm at it, clarify the related arch_prctl.2 man page.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Andy Lutomirski 38f7c37983 modify_ldt.2: Overhaul the documentation
This clarifies the behavior and documents all four functions.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Akihiro Motoki 97c0185b99 restart_syscall.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Luke Faraone fcf4536c62 mktemp.3: DESCRIPTION reference to BUGS corrected
mktemp(3)'s DESCRIPTION referenced NOTES, but no such
section exists. Corrected to refer to BUGS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 1fbe05e023 stat.2: NOTES: add "C library/kernel ABI differences" subheading
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 858f88b8a6 wait.2: Note that waitpid() is a wrapper for wait4()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk 3e5977d606 getpid.2: NOTES: add "C library/kernel ABI differences" subheading
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00
Michael Kerrisk a99f81e6b6 nice.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:13 +01:00