⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00000046.htm

📁 一份很好的linux入门资料
💻 HTM
📖 第 1 页 / 共 5 页
字号:
ts:&nbsp;a)&nbsp;sb-s_files&nbsp;list&nbsp;of&nbsp;all&nbsp;open&nbsp;files&nbsp;on&nbsp;this&nbsp;filesystem,&nbsp;if&nbsp;the&nbsp;correspo&nbsp;<BR>nding&nbsp;inode&nbsp;is&nbsp;not&nbsp;anonymous,&nbsp;then&nbsp;dentry_open()&nbsp;(called&nbsp;by&nbsp;filp_open()&nbsp;link&nbsp;<BR>s&nbsp;the&nbsp;file&nbsp;into&nbsp;this&nbsp;list;&nbsp;b)&nbsp;fs/file_table.c:free_list&nbsp;containing&nbsp;unused&nbsp;fi&nbsp;<BR>le&nbsp;structures;&nbsp;c)&nbsp;fs/file_table.c:anon_list,&nbsp;when&nbsp;a&nbsp;new&nbsp;file&nbsp;structure&nbsp;is&nbsp;cr&nbsp;<BR>eated&nbsp;by&nbsp;get_empty_filp()&nbsp;it&nbsp;is&nbsp;placed&nbsp;on&nbsp;this&nbsp;list.&nbsp;All&nbsp;these&nbsp;lists&nbsp;are&nbsp;pro&nbsp;<BR>tected&nbsp;by&nbsp;files_lock&nbsp;spinlock&nbsp;<BR>2.&nbsp;f_dentry&nbsp;-&nbsp;the&nbsp;dentry&nbsp;corresponding&nbsp;to&nbsp;this&nbsp;file.&nbsp;The&nbsp;dentry&nbsp;is&nbsp;created&nbsp;a&nbsp;<BR>t&nbsp;nameidata&nbsp;lookup&nbsp;time&nbsp;by&nbsp;open_namei()&nbsp;(or&nbsp;rather&nbsp;path_walk()&nbsp;which&nbsp;it&nbsp;call&nbsp;<BR>s)&nbsp;but&nbsp;the&nbsp;actual&nbsp;file-f_dentry&nbsp;field&nbsp;is&nbsp;set&nbsp;by&nbsp;dentry_open()&nbsp;to&nbsp;contain&nbsp;the&nbsp;<BR>&nbsp;dentry&nbsp;thus&nbsp;found&nbsp;<BR>3.&nbsp;f_vfsmnt&nbsp;-&nbsp;the&nbsp;pointer&nbsp;to&nbsp;vfsmount&nbsp;structure&nbsp;of&nbsp;the&nbsp;filesystem&nbsp;containing&nbsp;<BR>&nbsp;the&nbsp;file.&nbsp;This&nbsp;is&nbsp;set&nbsp;by&nbsp;dentry_open()&nbsp;but&nbsp;is&nbsp;found&nbsp;as&nbsp;part&nbsp;of&nbsp;nameidata&nbsp;lo&nbsp;<BR>okup&nbsp;by&nbsp;open_namei()&nbsp;(or&nbsp;rather&nbsp;path_init()&nbsp;which&nbsp;it&nbsp;calls)&nbsp;<BR>4.&nbsp;f_op&nbsp;-&nbsp;the&nbsp;pointer&nbsp;to&nbsp;file_operations&nbsp;which&nbsp;contains&nbsp;various&nbsp;methods&nbsp;that&nbsp;<BR>&nbsp;can&nbsp;be&nbsp;invoked&nbsp;on&nbsp;the&nbsp;file.&nbsp;This&nbsp;is&nbsp;copied&nbsp;from&nbsp;inode-i_fop&nbsp;which&nbsp;is&nbsp;placed&nbsp;<BR>&nbsp;there&nbsp;by&nbsp;filesystem-specific&nbsp;s_op-read_inode()&nbsp;method&nbsp;during&nbsp;nameidata&nbsp;look&nbsp;<BR>up.&nbsp;We&nbsp;will&nbsp;look&nbsp;at&nbsp;file_operations&nbsp;methods&nbsp;in&nbsp;detail&nbsp;later&nbsp;on&nbsp;in&nbsp;this&nbsp;secti&nbsp;<BR>on&nbsp;<BR>5.&nbsp;f_count&nbsp;-&nbsp;reference&nbsp;count&nbsp;manipulated&nbsp;by&nbsp;get_file/put_filp/fput&nbsp;<BR>6.&nbsp;f_flags&nbsp;-&nbsp;O_XXX&nbsp;flags&nbsp;from&nbsp;open(2)&nbsp;system&nbsp;call&nbsp;copied&nbsp;there&nbsp;(with&nbsp;slight&nbsp;&nbsp;<BR>modifications&nbsp;by&nbsp;filp_open)&nbsp;by&nbsp;dentry_open&nbsp;and&nbsp;after&nbsp;clearing&nbsp;O_CREAT,&nbsp;O_EXC&nbsp;<BR>L,&nbsp;O_NOCTTY,&nbsp;O_TRUNC&nbsp;-&nbsp;there&nbsp;is&nbsp;no&nbsp;point&nbsp;in&nbsp;storing&nbsp;these&nbsp;flags&nbsp;permanently&nbsp;&nbsp;<BR>since&nbsp;they&nbsp;cannot&nbsp;be&nbsp;modified&nbsp;by&nbsp;F_SETFL&nbsp;(or&nbsp;queried&nbsp;by&nbsp;F_GETFL)&nbsp;fcntl(2)&nbsp;ca&nbsp;<BR>lls&nbsp;<BR>7.&nbsp;f_mode&nbsp;-&nbsp;a&nbsp;combination&nbsp;of&nbsp;userspace&nbsp;flags&nbsp;and&nbsp;mode,&nbsp;set&nbsp;by&nbsp;dentry_open().&nbsp;<BR>&nbsp;The&nbsp;point&nbsp;of&nbsp;the&nbsp;conversion&nbsp;is&nbsp;to&nbsp;store&nbsp;read&nbsp;and&nbsp;write&nbsp;access&nbsp;in&nbsp;separate&nbsp;b&nbsp;<BR>its&nbsp;so&nbsp;one&nbsp;could&nbsp;do&nbsp;easy&nbsp;checks&nbsp;like&nbsp;(f_mode&nbsp;&amp;&nbsp;FMODE_WRITE)&nbsp;and&nbsp;(f_mode&nbsp;&amp;&nbsp;FM&nbsp;<BR>ODE_READ)&nbsp;<BR>8.&nbsp;f_pos&nbsp;-&nbsp;a&nbsp;current&nbsp;file&nbsp;position&nbsp;for&nbsp;next&nbsp;read&nbsp;or&nbsp;write&nbsp;to&nbsp;the&nbsp;file.&nbsp;Under&nbsp;<BR>&nbsp;i386&nbsp;it&nbsp;is&nbsp;of&nbsp;type&nbsp;long&nbsp;long,&nbsp;i.e.&nbsp;a&nbsp;64bit&nbsp;value&nbsp;<BR>9.&nbsp;f_reada,&nbsp;f_ramax,&nbsp;f_raend,&nbsp;f_ralen,&nbsp;f_rawin&nbsp;-&nbsp;to&nbsp;support&nbsp;readahead&nbsp;-&nbsp;too&nbsp;&nbsp;<BR>complex&nbsp;to&nbsp;be&nbsp;discussed&nbsp;by&nbsp;mortals&nbsp;;)&nbsp;<BR>10.&nbsp;f_owner&nbsp;-&nbsp;owner&nbsp;of&nbsp;file&nbsp;io&nbsp;to&nbsp;receive&nbsp;asynchronous&nbsp;io&nbsp;notifications&nbsp;via&nbsp;&nbsp;<BR>SIGIO&nbsp;mechanism&nbsp;(see&nbsp;fs/fcntl.c:kill_fasync())&nbsp;<BR>11.&nbsp;f_uid,&nbsp;f_gid&nbsp;-&nbsp;set&nbsp;to&nbsp;user&nbsp;id&nbsp;and&nbsp;group&nbsp;id&nbsp;of&nbsp;the&nbsp;process&nbsp;that&nbsp;opened&nbsp;th&nbsp;<BR>e&nbsp;file,&nbsp;when&nbsp;the&nbsp;file&nbsp;structure&nbsp;is&nbsp;created&nbsp;in&nbsp;get_empty_filp().&nbsp;If&nbsp;the&nbsp;file&nbsp;&nbsp;<BR>is&nbsp;a&nbsp;socket,&nbsp;used&nbsp;by&nbsp;ipv4&nbsp;netfilter&nbsp;<BR>12.&nbsp;f_error&nbsp;-&nbsp;used&nbsp;by&nbsp;NFS&nbsp;client&nbsp;to&nbsp;return&nbsp;write&nbsp;errors.&nbsp;It&nbsp;is&nbsp;set&nbsp;in&nbsp;fs/nfs&nbsp;<BR>/file.c&nbsp;and&nbsp;checked&nbsp;in&nbsp;mm/filemap.c:generic_file_write()&nbsp;<BR>13.&nbsp;f_version&nbsp;-&nbsp;versioning&nbsp;mechanism&nbsp;for&nbsp;invalidating&nbsp;caches,&nbsp;incremented&nbsp;(u&nbsp;<BR>sing&nbsp;global&nbsp;'event')&nbsp;whenever&nbsp;f_pos&nbsp;changes&nbsp;<BR>14.&nbsp;private_data&nbsp;-&nbsp;private&nbsp;per-file&nbsp;data&nbsp;which&nbsp;can&nbsp;be&nbsp;used&nbsp;by&nbsp;filesystems&nbsp;(e&nbsp;<BR>.g.&nbsp;coda&nbsp;stores&nbsp;credentials&nbsp;here)&nbsp;or&nbsp;by&nbsp;device&nbsp;drivers.&nbsp;Device&nbsp;drivers&nbsp;(in&nbsp;t&nbsp;<BR>he&nbsp;presence&nbsp;of&nbsp;devfs)&nbsp;could&nbsp;use&nbsp;this&nbsp;field&nbsp;to&nbsp;differentiate&nbsp;between&nbsp;multiple&nbsp;<BR>&nbsp;instances&nbsp;instead&nbsp;of&nbsp;the&nbsp;classical&nbsp;minor&nbsp;number&nbsp;encoded&nbsp;in&nbsp;file-f_dentry-d_&nbsp;<BR>inode-i_rdev&nbsp;<BR>Now&nbsp;let&nbsp;us&nbsp;look&nbsp;at&nbsp;file_operations&nbsp;structure&nbsp;which&nbsp;contains&nbsp;the&nbsp;methods&nbsp;that&nbsp;<BR>&nbsp;can&nbsp;be&nbsp;invoked&nbsp;on&nbsp;files.&nbsp;Let&nbsp;us&nbsp;recall&nbsp;that&nbsp;it&nbsp;is&nbsp;copied&nbsp;from&nbsp;inode-i_fop&nbsp;w&nbsp;<BR>here&nbsp;it&nbsp;is&nbsp;set&nbsp;by&nbsp;s_op-read_inode()&nbsp;method.&nbsp;It&nbsp;is&nbsp;declared&nbsp;in&nbsp;include/linux/&nbsp;<BR>fs.h:&nbsp;<BR>struct&nbsp;file_operations&nbsp;{&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;struct&nbsp;module&nbsp;*owner;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loff_t&nbsp;(*llseek)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;loff_t,&nbsp;int);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssize_t&nbsp;(*read)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;char&nbsp;*,&nbsp;size_t,&nbsp;loff_t&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssize_t&nbsp;(*write)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;const&nbsp;char&nbsp;*,&nbsp;size_t,&nbsp;loff_t&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*readdir)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;void&nbsp;*,&nbsp;filldir_t);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsigned&nbsp;int&nbsp;(*poll)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;struct&nbsp;poll_table_struct&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*ioctl)&nbsp;(struct&nbsp;inode&nbsp;*,&nbsp;struct&nbsp;file&nbsp;*,&nbsp;unsigned&nbsp;int,&nbsp;unsigned&nbsp;&nbsp;<BR>long);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*mmap)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;struct&nbsp;vm_area_struct&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*open)&nbsp;(struct&nbsp;inode&nbsp;*,&nbsp;struct&nbsp;file&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*flush)&nbsp;(struct&nbsp;file&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*release)&nbsp;(struct&nbsp;inode&nbsp;*,&nbsp;struct&nbsp;file&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*fsync)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;struct&nbsp;dentry&nbsp;*,&nbsp;int&nbsp;datasync);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*fasync)&nbsp;(int,&nbsp;struct&nbsp;file&nbsp;*,&nbsp;int);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;(*lock)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;int,&nbsp;struct&nbsp;file_lock&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssize_t&nbsp;(*readv)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;const&nbsp;struct&nbsp;iovec&nbsp;*,&nbsp;unsigned&nbsp;long&nbsp;<BR>,&nbsp;loff_t&nbsp;*);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ssize_t&nbsp;(*writev)&nbsp;(struct&nbsp;file&nbsp;*,&nbsp;const&nbsp;struct&nbsp;iovec&nbsp;*,&nbsp;unsigned&nbsp;lon&nbsp;<BR>g,&nbsp;loff_t&nbsp;*);&nbsp;<BR>};&nbsp;<BR>1.&nbsp;owner&nbsp;-&nbsp;a&nbsp;pointer&nbsp;to&nbsp;the&nbsp;module&nbsp;that&nbsp;owns&nbsp;the&nbsp;subsystem&nbsp;in&nbsp;question.&nbsp;Only&nbsp;<BR>&nbsp;drivers&nbsp;need&nbsp;to&nbsp;set&nbsp;it&nbsp;to&nbsp;THIS_MODULE,&nbsp;filesystems&nbsp;can&nbsp;happily&nbsp;ignore&nbsp;it&nbsp;be&nbsp;<BR>cause&nbsp;their&nbsp;module&nbsp;counts&nbsp;are&nbsp;controlled&nbsp;at&nbsp;mount/umount&nbsp;time&nbsp;whilst&nbsp;the&nbsp;dri&nbsp;<BR>vers&nbsp;need&nbsp;to&nbsp;control&nbsp;it&nbsp;at&nbsp;open/release&nbsp;time&nbsp;<BR>2.&nbsp;llseek&nbsp;-&nbsp;implements&nbsp;the&nbsp;lseek(2)&nbsp;system&nbsp;call.&nbsp;Usually&nbsp;it&nbsp;is&nbsp;omitted&nbsp;and&nbsp;f&nbsp;<BR>s/read_write.c:default_llseek()&nbsp;is&nbsp;used&nbsp;which&nbsp;does&nbsp;the&nbsp;right&nbsp;thing&nbsp;(TODO:&nbsp;fo&nbsp;<BR>rce&nbsp;all&nbsp;those&nbsp;who&nbsp;set&nbsp;it&nbsp;to&nbsp;NULL&nbsp;currently&nbsp;to&nbsp;use&nbsp;default_llseek&nbsp;-&nbsp;that&nbsp;way&nbsp;&nbsp;<BR>we&nbsp;save&nbsp;an&nbsp;if()&nbsp;in&nbsp;llseek())&nbsp;<BR>3.&nbsp;read&nbsp;-&nbsp;implements&nbsp;read(2)&nbsp;system&nbsp;call.&nbsp;Filesystems&nbsp;can&nbsp;use&nbsp;mm/filemap.c:g&nbsp;<BR>eneric_file_read()&nbsp;for&nbsp;regular&nbsp;files&nbsp;and&nbsp;fs/read_write.c:generic_read_dir()&nbsp;&nbsp;<BR>(which&nbsp;simply&nbsp;returns&nbsp;-EISDIR)&nbsp;for&nbsp;directories&nbsp;here&nbsp;<BR>4.&nbsp;write&nbsp;-&nbsp;implements&nbsp;write(2)&nbsp;system&nbsp;call.&nbsp;Filesystems&nbsp;can&nbsp;use&nbsp;mm/filemap.c&nbsp;<BR>∶<I>generic_file_write()&nbsp;for&nbsp;regular&nbsp;files&nbsp;and&nbsp;ignore&nbsp;it&nbsp;for&nbsp;directories&nbsp;here&nbsp;</I><BR>5.&nbsp;readdir&nbsp;-&nbsp;used&nbsp;by&nbsp;filesystems.&nbsp;Ignored&nbsp;for&nbsp;regular&nbsp;files&nbsp;and&nbsp;implements&nbsp;r&nbsp;<BR>eaddir(2)&nbsp;and&nbsp;getdents(2)&nbsp;system&nbsp;calls&nbsp;for&nbsp;directories&nbsp;<BR>6.&nbsp;poll&nbsp;-&nbsp;implements&nbsp;poll(2)&nbsp;and&nbsp;select(2)&nbsp;system&nbsp;calls&nbsp;<BR>7.&nbsp;ioctl&nbsp;-&nbsp;implements&nbsp;driver&nbsp;or&nbsp;filesystem-specific&nbsp;ioctls.&nbsp;Note&nbsp;that&nbsp;generi&nbsp;<BR>c&nbsp;file&nbsp;ioctls&nbsp;like&nbsp;FIBMAP,&nbsp;FIGETBSZ,&nbsp;FIONREAD&nbsp;are&nbsp;implemented&nbsp;by&nbsp;higher&nbsp;leve&nbsp;<BR>ls&nbsp;so&nbsp;they&nbsp;never&nbsp;read&nbsp;f_op-ioctl()&nbsp;method&nbsp;<BR>8.&nbsp;mmap&nbsp;-&nbsp;implements&nbsp;mmap&nbsp;system&nbsp;call.&nbsp;Filesystems&nbsp;can&nbsp;use&nbsp;generic_file_mmap&nbsp;<BR>&nbsp;here&nbsp;for&nbsp;regular&nbsp;files&nbsp;and&nbsp;ignore&nbsp;it&nbsp;on&nbsp;directories&nbsp;<BR>9.&nbsp;open&nbsp;-&nbsp;called&nbsp;at&nbsp;open(2)&nbsp;time&nbsp;by&nbsp;dentry_open().&nbsp;Filesystems&nbsp;rarely&nbsp;use&nbsp;th&nbsp;<BR>is,&nbsp;e.g.&nbsp;coda&nbsp;tries&nbsp;to&nbsp;cache&nbsp;the&nbsp;file&nbsp;locally&nbsp;at&nbsp;open&nbsp;time&nbsp;<BR>10.&nbsp;flush&nbsp;-&nbsp;called&nbsp;at&nbsp;each&nbsp;close(2)&nbsp;of&nbsp;this&nbsp;file,&nbsp;not&nbsp;necessarily&nbsp;the&nbsp;last&nbsp;o&nbsp;<BR>ne&nbsp;(see&nbsp;release()&nbsp;method&nbsp;below).&nbsp;The&nbsp;only&nbsp;filesystem&nbsp;that&nbsp;uses&nbsp;this&nbsp;is&nbsp;NFS&nbsp;c&nbsp;<BR>lient&nbsp;to&nbsp;flush&nbsp;all&nbsp;dirty&nbsp;pages.&nbsp;Note&nbsp;that&nbsp;this&nbsp;can&nbsp;return&nbsp;an&nbsp;error&nbsp;which&nbsp;wil&nbsp;<BR>l&nbsp;be&nbsp;passed&nbsp;back&nbsp;to&nbsp;userspace&nbsp;which&nbsp;made&nbsp;the&nbsp;close(2)&nbsp;system&nbsp;call&nbsp;<BR>11.&nbsp;release&nbsp;-&nbsp;called&nbsp;at&nbsp;the&nbsp;last&nbsp;close(2)&nbsp;of&nbsp;this&nbsp;file,&nbsp;i.e.&nbsp;when&nbsp;file-f_cou&nbsp;<BR>nt&nbsp;reaches&nbsp;0.&nbsp;Although&nbsp;defined&nbsp;as&nbsp;returning&nbsp;int,&nbsp;the&nbsp;return&nbsp;value&nbsp;is&nbsp;ignored&nbsp;<BR>&nbsp;by&nbsp;VFS&nbsp;(see&nbsp;fs/file_table.c:__fput())&nbsp;<BR>12.&nbsp;fsync&nbsp;-&nbsp;maps&nbsp;directly&nbsp;to&nbsp;fsync(2)/fdatasync(2)&nbsp;system&nbsp;calls,&nbsp;with&nbsp;the&nbsp;la&nbsp;<BR>st&nbsp;argument&nbsp;specifying&nbsp;whether&nbsp;it&nbsp;is&nbsp;fsync&nbsp;or&nbsp;fdatasync.&nbsp;Almost&nbsp;no&nbsp;work&nbsp;is&nbsp;d&nbsp;<BR>one&nbsp;by&nbsp;VFS&nbsp;around&nbsp;this,&nbsp;except&nbsp;to&nbsp;map&nbsp;file&nbsp;descriptor&nbsp;to&nbsp;a&nbsp;file&nbsp;structure&nbsp;(f&nbsp;<BR>ile&nbsp;=&nbsp;fget(fd))&nbsp;and&nbsp;down/up&nbsp;inode-i_sem&nbsp;semaphore.&nbsp;Ext2&nbsp;filesystem&nbsp;currently&nbsp;<BR>&nbsp;ignores&nbsp;the&nbsp;last&nbsp;argument&nbsp;and&nbsp;does&nbsp;exactly&nbsp;the&nbsp;same&nbsp;for&nbsp;fsync(2)&nbsp;and&nbsp;fdatas&nbsp;<BR>ync(2)&nbsp;<BR>13.&nbsp;fasync&nbsp;-&nbsp;this&nbsp;method&nbsp;is&nbsp;called&nbsp;when&nbsp;file-f_flags&nbsp;&amp;&nbsp;FASYNC&nbsp;changes&nbsp;<BR>14.&nbsp;lock&nbsp;-&nbsp;the&nbsp;filesystem-specific&nbsp;portion&nbsp;of&nbsp;the&nbsp;POSIX&nbsp;fcntl()&nbsp;file&nbsp;region&nbsp;&nbsp;<BR>locking&nbsp;mechanism.&nbsp;The&nbsp;only&nbsp;bug&nbsp;here&nbsp;is&nbsp;that&nbsp;because&nbsp;it&nbsp;is&nbsp;called&nbsp;before&nbsp;fs-&nbsp;<BR>independent&nbsp;portion&nbsp;(posix_lock_file()),&nbsp;if&nbsp;it&nbsp;succeeds&nbsp;but&nbsp;the&nbsp;standard&nbsp;pos&nbsp;<BR>ix&nbsp;lock&nbsp;code&nbsp;fails&nbsp;then&nbsp;it&nbsp;will&nbsp;never&nbsp;be&nbsp;unlocked&nbsp;on&nbsp;fs-dependent&nbsp;level..&nbsp;<BR>15.&nbsp;readv&nbsp;-&nbsp;implements&nbsp;readv(2)&nbsp;system&nbsp;call&nbsp;<BR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -