This file is indexed.

/usr/share/doc/HOWTO/ja-html/Linux-Kernel-Internals-4.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>Linux Kernel 2.4 Internals: Linux $B%Z!<%8%-%c%C%7%e(B</TITLE>
 <LINK HREF="Linux-Kernel-Internals-5.html" REL=next>
 <LINK HREF="Linux-Kernel-Internals-3.html" REL=previous>
 <LINK HREF="Linux-Kernel-Internals.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="Linux-Kernel-Internals-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="Linux-Kernel-Internals-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="Linux-Kernel-Internals.html#toc4">$BL\<!$X(B</A>
<HR>
<H2><A NAME="s4">4.</A> <A HREF="Linux-Kernel-Internals.html#toc4">Linux $B%Z!<%8%-%c%C%7%e(B</A></H2>


<P>$B$3$N>O$G$O!"(BLinux 2.4$B$N%Z!<%8%-%c%C%7%e$K$D$$$F@bL@$7$^$9!#%Z!<%8%-%c%C%7%e$O!"(B
$BL>A0$,<($7$F$$$k$h$&$K!"J*M}%Z!<%8$N%-%c%C%7%e$G$9!#(BUNIX $B$N@$3&$G$O%Z!<%8%-%c%C%7%e$N9M$(J}$O(B SVR4 UNIX $B$NEP>l$K$h$j!"%G!<%?(BI/O$BA`:n$G$N%P%C%U%!!<%-%c%C%7%e$rCV$-49$($k$h$&$K$7$FNI$/;H$o$l$k$h$&$K$J$j$^$7$?!#(B
SVR4 $B%Z!<%8%-%c%C%7%e$G$O!"%U%!%$%k%7%9%F%`$N%G!<%?%-%c%C%7%e$H$7$F$N$_;H$o$l$F$*$j!"(B
$B$7$?$,$C$F(B vnode $B9=B$BN$H%U%!%$%k$N%*%U%;%C%H$r%O%C%7%e%Q%i%a!<%?$H$7$F;H$C$F$$$^$9$,!"(B
Linux $B$N%Z!<%8%-%c%C%7%e$O$h$j0lHLE*$K@_7W$5$l$F$$$k$?$a!"(B($B0J2<$G@bL@$9$k(B)$B9=B$BN(B address_space $B$r0l$DL\$N%Q%i%a%?$H$7$F;H$$$^$9!#(B
Linux $B%Z!<%8%-%c%C%7%e$O!"%"%I%l%96u4V$NI=5-K!$K6/$/7k$SIU$1$i$l$F$$$k$?$a!"(B
$B%Z!<%8%-%c%C%7%e$NF/$-$rM}2r$9$k$K$O!">/$J$/$H$b(B address_space $B$N4pK\E*$JM}2r$,I,MW$G$9!#(B
address_space $B$O%=%U%H%&%(%"(B MMU $B$N0l<o$G!"$"$k%*%V%8%'%/%H(B ($BNc$($P(B inode) $B$N$9$Y$F$N%Z!<%8$rB>$NBP1~$9$kCM(B($BE57?E*$K$OJ*M}%G%#%9%/%V%m%C%/(B)$B$X$HBP1~$E$1$F$$$^$9!#9=B$BN(B address_spece $B$O(B <CODE>include/linux/fs.h</CODE> $B$G0J2<$N$h$&$KDj5A$5$l$F$$$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
        struct address_space {
                struct list_head        clean_pages;
                struct list_head        dirty_pages;
                struct list_head        locked_pages;
                unsigned long           nrpages;
                struct address_space_operations *a_ops;
                struct inode            *host;
                struct vm_area_struct   *i_mmap;
                struct vm_area_struct   *i_mmap_shared;
                spinlock_t              i_shared_lock;
        };
</PRE>
<HR>
</CODE></BLOCKQUOTE>
</P>
<P>address_spaces $B$NF/$/J}K!$rM}2r$9$k$K$O!"$3$l$i$N%a%s%P$N0lIt$r8+$k$@$1$G$$$$$G$7$g$&!#(B
<CODE>clean_pages</CODE>$B!"(B<CODE>dirty_pages</CODE>$B!"(B<CODE>locked_pages</CODE> $B$O!"$3$N(B address_space $B$KB0$7$F$$$k(B clean$B!"(Bdirty$B!"(Blocked $B$N$=$l$>$l$N%Z!<%8$K$D$$$F$NAPJ}8~%j%s%/%j%9%H$G$9!#(B
$B$^$?!"(B <CODE>nrpages</CODE> $B$O$3$N(B address_space $B$NAm%Z!<%8?t$K$J$C$F$$$^$9!#(B
<CODE>a_ops</CODE> $B$O!"$3$N%*%V%8%'%/%H$N%a%=%C%I$rDj5A$7$F$*$j!"(B
<CODE>host</CODE> $B$O!"$3$N(B address_space $B$,B0$9$k(B inode $B$X$N%]%$%s%?$H$J$C$F$$$^$9!#$3$l$O(B NULL $B$K$b$J$j$^$9!#Nc$($P!"(Bswapper $B$N(B address_space $B$N>l9g(B (<CODE>mm/swap_state.c</CODE>) $B$,$=$l$K$"$?$j$^$9!#(B</P>
<P><CODE>clean_pages</CODE> $B$d(B <CODE>dirty_pages</CODE>$B!"$=$l$K(B <CODE>locked_pages</CODE>$B!"(B <CODE>nrpages</CODE> $B$NMQK!$O<+L@$@$H;W$$$^$9$N$G!"(B <CODE>address_space_operations</CODE> $B9=B$BN$r$7$C$+$j$_$F$$$-$^$9!#$3$l$OF1$8$X%C%@%U%!%$%k$KDj5A$5$l$F$*$j!"(B</P>
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
        struct address_space_operations {
                int (*writepage)(struct page *);
                int (*readpage)(struct file *, struct page *);
                int (*sync_page)(struct page *);
                int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
                int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
                int (*bmap)(struct address_space *, long);
        };
</PRE>
<HR>
</CODE></BLOCKQUOTE>

$B$H$J$C$F$$$^$9!#(B</P>
<P>address_space $B$H(B $B%Z!<%8%-%c%C%7%e$N4pK\E*$J9M$(J}$+$i$O!"(B-><CODE>writepage</CODE> $B$H(B -><CODE>readpage</CODE>$B$KCmL\$9$kI,MW$,$"$j$^$9!#$7$+$7!"<B:]$K$O(B -><CODE>prepare_write</CODE>$B$H(B -><CODE>commit_write</CODE>$B$K$bCmL\$9$kI,MW$,$"$j$^$9!#(B</P>
<P>$B$*$=$i$/$=$NL>A0$+$i$NO"A[$@$1$G(B address_space_operations $B%a%=%C%I$,2?$r<B9T$9$k$+!"Ev$F$k$3$H$,$G$-$k$G$7$g$&!#$=$l$G$b!"<c43$NDI2C@bL@$OI,MW$G$9!#%U%!%$%k%7%9%F%`%G!<%?(B I/O $B$G$N;H$o$l$+$?$O!"%Z!<%8%-%c%C%7%e$XDL$8$k2&F;$G$"$j!"M}2r$9$k$N$K$&$C$F$D$1$G$9!#(B
$BB?$/$NB>$N(BUNIX$B7O$N%*%Z%l!<%F%#%s%0%7%9%F%`$H0c$$!"(BLinux $B$G$O!"%Z!<%8%-%c%C%7%e$K$h$k%G!<%?(B I/O $B$KBP$7$F0lHLE*$J%U%!%$%kA`:n(B( SYSV $B$N(B vnode $BA`:n$N%5%V%;%C%H(B)$B$,2DG=$G$9!#$3$l$O!"(Bread/write/mmap $B$K$*$$$F$O%G!<%?$,D>@\%U%!%$%k%7%9%F%`$H:nMQ$;$:!"2DG=$J8B$j%Z!<%8%-%c%C%7%e$X$N=q$-9~$_$dFI$_9~$_$K$h$C$F9T$o$l$k$3$H$r0UL#$7$F$$$^$9!#%Z!<%8%-%c%C%7%e$O!"%f!<%6$,%a%b%j$K$J$$%Z!<%8$+$iFI$_9~$_$?$$>l9g$d%a%b%j$,>/$J$$>l9g$K%G%#%9%/$X%G!<%?$r=q$-9~$_$?$$>l9g$K!"%G!<%?$r<B:]$NDc%l%Y%k%U%!%$%k%7%9%F%`$+$i<hF@$7$J$1$l$P$J$j$^$;$s!#(B</P>
<P>$BFI$_9~$_%Q%9$G$O!"0lHLE*$J%a%=%C%I$G$O!":G=i$KI,MW$H$9$k(Binode/$B%$%s%G%C%/%9%?%W%k$KBP1~$9$k%Z!<%8$r8+$D$1$h$&$H$7$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
hash = page_hash(inode->i_mapping, index);
</CODE></BLOCKQUOTE>

$B$=$7$F$I$N%Z!<%8$,<B:]$KB8:_$7$F$$$k$+%F%9%H$7$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
hash = page_hash(inode->i_mapping, index);
page = __find_page_nolock(inode->i_mapping, index, *hash);
</CODE></BLOCKQUOTE>

$B$b$7B8:_$7$J$$$H$-$O?7$7$$%U%j!<%Z!<%8$r3d$jEv$F%Z!<%8%-%c%C%7%e$XDI2C$7$^$9!#(B
<BLOCKQUOTE><CODE>
page = page_cache_alloc();
__add_to_page_cache(page, mapping, index, hash);
</CODE></BLOCKQUOTE>

$B%Z!<%8$,%O%C%7%e$5$l$?$i!"(B-><CODE>readpage</CODE> $B%"%I%l%96u4VA`:n$r;H$C$F!"%Z!<%8$r<B:]$K%G!<%?$GKd$a(B($B%U%!%$%k$O(Binode$B$N%*!<%W%s%$%s%9%?%s%9(B)$B$^$9!#(B
<BLOCKQUOTE><CODE>
error = mapping->a_ops->readpage(file, page);
</CODE></BLOCKQUOTE>

$B:G8e$K%G!<%?$r%f!<%6%9%Z!<%9$K%3%T!<$7$^$9!#(B</P>
<P>$B%U%!%$%k%7%9%F%`$K=q$/$K$O(B2$B$D$N%Q%9$,$"$j$^$9!#(B1$B$D$O%^%C%W(B(mmap)$B$K=q$-9~$`$3$H!"$b$&0l$D$O(B write(2) $B$N$h$&$J%7%9%F%`%3!<%k$rMQ$$$k$3$H$G$9!#(Bmmap $B$N>l9g$,$H$F$b%7%s%W%k$J$3$H$+$i!"$^$::G=i$K<h$j>e$2$k$3$H$K$7$^$9!#(B
$B%f!<%6$,%^%C%W$rJQ99$9$k$H$-!"(BVM$B%5%V%7%9%F%`$O%Z!<%8$r(B dirty $B$H%^!<%/$7$^$9!#(B</P>

<P>
<BLOCKQUOTE><CODE>
SetPageDirty(page);
</CODE></BLOCKQUOTE>

$B%P%C%/%0%i%s%I$G$N3hF0$H$7$F!"$"$k$$$O%a%b%j$,>/$J$/$J$C$?$N$rM}M3$H$7$F!"%Z!<%8$r2rJ|$7$h$&$H$9$k(B bdflush $B%+!<%M%k%9%l%C%I$O!"(Bdirty $B$H%^!<%/$5$l$?%Z!<%8$N(B -><CODE>writepage</CODE> $B$r8F$\$&$H$7$^$9!#(B-><CODE>writepage</CODE> $B%a%=%C%I$O!"%Z!<%8$NFbMF$r%G%#%9%/$K=q=P$7!"%Z!<%8$r2rJ|$7$J$1$l$P$J$j$^$;$s!#(B</P>
<P>2$B$D$a$N=q$-9~$_%Q%9$O!"(B $B!v$H$F$b!v$?$$$X$sJ#;($G$9!#%f!<%6$,=q$-9~$`3F%Z!<%8$KBP$7$F!"4pK\E*$K0J2<$N$3$H$r9T$$$^$9(B($B%3!<%I$NA4BN$O(B <CODE>mm/filemap.c:generic_file_write()</CODE> $B$r;2>H(B)$B!#(B</P>
<P>
<BLOCKQUOTE><CODE>
page = __grab_cache_page(mapping, index, &amp;cached_page);
mapping->a_ops->prepare_write(file, page, offset, offset+bytes);
copy_from_user(kaddr+offset, buf, bytes);
mapping->a_ops->commit_write(file, page, offset, offset+bytes);
</CODE></BLOCKQUOTE>
</P>
<P>$B:G=i$K!"%O%C%7%e$5$l$?%Z!<%8$r8+$D$1$h$&$H$9$k$+?7$7$$%Z!<%8$r3d$jEv$F$h$&$H$7$^$9!#$=$7$F!"(B-><CODE>prepare_write</CODE> $B%"%I%l%96u4V%a%=%C%I$r8F$S=P$7!"%f!<%6%P%C%U%!$r%+!<%M%k%a%b%j$K%3%T!<$7!"$=$7$F:G8e$K(B -><CODE>commit_write</CODE> $B%a%=%C%I$r8F$S=P$7$^$9!#$*$=$i$/(B -><CODE>prepare_write</CODE> $B$H(B -><CODE>commit_write</CODE> $B$O!"(B-><CODE>readpage</CODE> $B$H(B -><CODE>writepage</CODE> $B$+$i$O4pK\E*$K0[$J$k$b$N$K8+$($k$G$7$g$&!#$3$l$OJ*M}(B I/O $B$r<B:]$K5a$a$i$l$?;~$@$1$G$O$J$/!"%f!<%6$,%U%!%$%k$rJQ99$7$?$H$-$K$O$$$D$b8F$S=P$5$l$k$+$i$G$9!#(B
$B$3$l$r07$&J}K!$O(B2$B$D(B($B$"$k$$$O$=$l0J>e(B?)$B$"$j$^$9!#0l$D$a$O(B <CODE>page->buffers</CODE> $B%]%$%s%?$r(B try_to_free_buffers(<CODE>fs/buffers.c</CODE>) $B$G;H$o$l$F$$$k(B buffer_heads $B$GKd$a$k$3$H$G!"J*M}(B IO $B$NCY1d$K(B Linux $B%P%C%U%!!<%-%c%C%7%e$r;H$$$^$9!#(B
$B$b$&0l$D$NJ}K!$O!"%Z!<%8$r(B dirty $B$KC1$K@_Dj$7!"8e$NA4$F$r(B -><CODE>writepage</CODE>$B$K$^$+$;$k$3$H$G$9!#(B
$B%Z!<%89=B$BN$KM-8z$J%S%C%H%^%C%W$,7g$1$F$$$k$?$a!"(B<CODE>PAGE_SIZE</CODE>$B$h$j>.$5$$(Bgranuality$B$r$b$C$F$$$k%U%!%$%k%7%9%F%`$G$OF/$-$^$;$s!#(B</P>

<HR>
<A HREF="Linux-Kernel-Internals-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="Linux-Kernel-Internals-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="Linux-Kernel-Internals.html#toc4">$BL\<!$X(B</A>
</BODY>
</HTML>