今日重点:✍️ 写作——今天学一份会带路的 cover letter。素材是 vfs 新增 O_CREAT|O_DIRECTORY 系列(12 篇)的真实 cover,作者不光说「我做了什么」,还主动告诉评审「重点看哪几篇、为什么非这么做不可」。

✍️ 写作:cover letter 的三个高阶动作

/ section

① 一句话讲清「这个系列做什么」——冒号列点

linux-fsdevel · [PATCH v6 00/12] vfs: add O_CREAT|O_DIRECTORY to open*(2)

真实原句 This series implements new semantics for the O_CREAT|O_DIRECTORY flag combination for open*(2): perform a mkdir and open the resulting directory; return a pinning fd (which mkdir does not).
中文理解 「本系列为 open*(2) 的 O_CREAT|O_DIRECTORY 组合实现新语义:执行 mkdir 并打开建出的目录;返回一个 pinning fd(mkdir 做不到这点)。」——冒号后两个分号隔开的动作,读者一眼看懂新 API 是干嘛的。
写作要点 主句用 This series implements ... 立住主题,冒号后用分号列点把「动作 + 附带好处」讲完。括号里 (which mkdir does not) 是点睛——一句对比点出「为什么要新加」:mkdir 不返回 fd,所以要它。

② 主动给评审划重点——「重头戏在 X,另外 Y 值得多看」

同一封 cover

真实原句 Most of the work happens in "vfs: add O_CREAT|O_DIRECTORY to open*(2)" ... The "vfs: short-circuit MAY_WRITE access for O_DIRECTORY opens" patch is also worth paying extra attention to as it short-circuits doomed opening of directories as writable.
中文理解 「大部分工作集中在『vfs: add O_CREAT|O_DIRECTORY to open*(2)』这篇……另外『vfs: short-circuit MAY_WRITE access…』这篇也值得特别留意,因为它提前拦掉了注定失败的『以可写方式打开目录』。」
写作要点 长篇系列(12 篇)里,评审不可能逐篇细读。这两句是给评审带路Most of the work happens in X 指出重头戏,X is also worth paying extra attention to as ... 点名容易漏的关键补丁并给出理由。学会这招,你的系列不再「12 篇一锅端」。

③ 用 However 交代动机——「现状 + 这样不行」

同一封 cover

真实原句 This check (to prevent one from opening directories as writable) is currently done very late in do_open(), after an inode has been obtained. However, when introducing O_CREAT|O_DIRECTORY this is unacceptable as it would create the directory and then still fail.
中文理解 「这个检查(防止以可写方式打开目录)目前做得很晚,在 do_open() 里拿到 inode 之后才做。然而,引入 O_CREAT|O_DIRECTORY 后这样不可接受——因为它会先把目录建出来,然后仍然失败。」
写作要点 标准动机三段结构:currently done ... (现状)→ However, ... this is unacceptable as it would ...(为什么现状不行)。unacceptable 下判断、as it would ... 给后果(建了目录又失败,留下垃圾)。想让评审认同你的改动,就照这个「现状 → 不可接受 → 后果」来写。

✨ 辅助彩蛋(地道表达)

/ section

worth paying extra attention to

地道表达 · 从这三句里拎出来

真实原句 The "..." patch is also worth paying extra attention to as it short-circuits doomed opening of directories as writable.
中文理解 「……这篇补丁也值得特别留意,因为它提前拦下了注定失败的目录写打开。」
用法 be worth paying extra attention to(值得格外留意)是评审场景的高频客套+提醒:既礼貌(不是命令),又明确(点名了)。可套:The locking change is worth paying extra attention to as it touches a hot path. 顺带学 short-circuit(短路/提前拦截)+ doomed(注定失败的)—— 两个很地道的搭配。

✍️ 今日练习

/ section
✍️ 仿写:假设你提一个系列,给「新增一个系统调用参数」写 3 句英文 cover —— ① 一句话讲清系列做什么(This series implements ... : ...; ...);② 给评审划重点(Most of the work happens in ... / ... is worth paying extra attention to as ...);③ 用 However 交代动机(现状 + 这样不可接受 + 后果)。
💡 显示答案
参考(仿写示范,非原句):This series implements a new flag for clone3(2): create the child in a paused state; return control before exec. Most of the work happens in "clone3: add CLONE_PAUSED," while the "signal: skip wakeups for paused children" patch is worth paying extra attention to as it touches the wakeup fast path. Today the state is set after the child has already run. However, for a debugger-style launch this is unacceptable as the child may race ahead before the tracer is attached.
📖 原文:This series implements new semantics for the O_CREAT|O_DIRECTORY flag combination for open*(2): perform a mkdir and open the resulting directory; return a pinning fd (which mkdir does not).
📎 原文引用

A good cover letter doesn't just report work — it walks the reviewer to the parts that matter.

内核英语 · 每日一篇