Linux Documentation
 help / color / mirror / Atom feed
* [PATCH] btrfs: add a maintainer entry profile
@ 2026-11-25  4:46 Qu Wenruo
  2026-11-26 13:37 ` Leon Romanovsky
  2026-11-26 15:51 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-11-25  4:46 UTC (permalink / raw)
  To: linux-btrfs, workflows, linux-doc

This new file is mostly based on my personal preferences, focusing on
how to improve the human readability in the LLM era.

The new file should also act as a guide for humans that want to be a
long term contributor to btrfs.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
Changelog:
RFC->v1:
- Use maintainer entry profile instead of agent.md

- Further simplfy the content for human readers

---
 Documentation/process/maintainer-btrfs.rst | 154 +++++++++++++++++++++
 MAINTAINERS                                |   2 +
 2 files changed, 156 insertions(+)
 create mode 100644 Documentation/process/maintainer-btrfs.rst

diff --git a/Documentation/process/maintainer-btrfs.rst b/Documentation/process/maintainer-btrfs.rst
new file mode 100644
index 000000000000..5170dd73e655
--- /dev/null
+++ b/Documentation/process/maintainer-btrfs.rst
@@ -0,0 +1,154 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+Btrfs patch guidelines
+======================
+
+Human readability comes first. A reviewer should be able to understand the
+problem and the fix from the message and code.
+
+Bloated LLM-generated information only wastes precious human time, no matter
+whether it is in a comment or a commit message.
+
+Code comments
+-------------
+
+* **Necessary comment only**
+
+  Comment is for things that are not obvious by itself, e.g. a locking
+  rule, an ordering requirement or a non-trivial reason for a workaround.
+
+  Keep the comment short if possible.
+
+  Don't repeat what the code does.
+
+* **Add kernel-doc only for complex and/or exported functions**
+
+  If the function and parameter names are self-explaining, don't waste words
+  on the kernel-doc.
+
+Commit messages and cover letters
+---------------------------------
+
+* **Keep it simple**
+
+  Use short and simple sentences, avoid long paragraphs.
+
+  Simple patch for simple bug. Don't write a full [BUG] [CAUSE] [FIX] analysis
+  for something like a simple error handling enhancement.
+
+  And we don't care how you or your LLM found the bug unless it's hit in the
+  real world, so don't put such information even after the "---" line.
+
+* **Prefer visual aids over long sentences**
+
+  See "Visual aids" section below.
+
+* **Follow the style of well-known btrfs developers**
+
+  Check ``git log -- fs/btrfs`` for recent examples before drafting.
+
+Visual aids
+-----------
+
+Prefer visual aids like an ASCII chart over words, e.g.:
+
+* A race. Show the race window, do not describe it in prose only.
+* An error handling bug in a function, seen from several call sites.
+* A call chain across layers, where the bug only shows on a certain path.
+
+Example, a race::
+
+   CPU0 (endio)                       CPU1 (fsync)
+   end_bbio_data_write()
+   |-btrfs_folio_clear_writeback()
+   |                                  btrfs_sync_file()
+   |                                  |-filemap_fdatawait_range()
+   |                                  | Returns after writeback finished
+   |                                  |
+   |                                  \-test_and_clear_bit(COW_WRITE_ERROR)
+   |                                    Still 0, skips waiting
+   \-set_bit(COW_WRITE_ERROR)
+     Too late.
+
+Example, an error handling bug, from commit c9583ada8cc4. The callee cleans up
+on error, then the caller cleans up again::
+
+   btrfs_do_readpage()
+   |-submit_extent_page()
+   | \-submit_one_bio()
+   |   \-btrfs_submit_data_bio()
+   |     \-bio_endio()
+   |       Calls end_page_read() and unlock_extent().
+   |
+   \-end_page_read() and unlock_extent()
+     Cleaned up again, the subpage reader count underflows.
+
+Versioned patches
+-----------------
+
+* **Full history**
+
+  Include all versions, not only the changes of the last version.
+
+* **Newest version first**
+
+  E.g.::
+
+    v3:
+    - Rename the helper to xxx()
+    - Add a missing lock in yyy()
+
+    v2:
+    - Fix the build failure on 32-bit
+
+* **Changelog location**
+
+  Put it in the cover letter for a patch series, or after the "---" line for
+  a single patch.
+
+  Don't put it in the commit message body.
+
+Review
+------
+
+* **Follow the review**
+
+  Don't send a patch and just forget it. If you're not a well known developer,
+  it's uncommon to get merged on the first try.
+
+  One will need to communicate with the reviewers to get at least one review
+  from a well known btrfs developer, before getting the patch merged.
+
+* **Check Sashiko**
+
+  Sashiko posts AI-generated review for patches sent to the mailing list. The
+  btrfs list is at https://sashiko.dev/#/?list=org.kernel.vger.linux-btrfs
+
+  If a report is valid, address it in a newer version.
+
+  If a report is obviously wrong, it can be ignored. If the report is wrong but
+  the reason is not obvious, explaining it on the mailing list can help.
+
+Testing
+-------
+
+* **Run full fstests**
+
+  That's the main test suite we use.
+
+* **Testing procedures and results are only for complex patches**
+
+  Simple fixes shouldn't need a long paragraph on how to verify the fix.
+  Those simple fixes should be explained well by the commit message and code.
+
+  Bloated LLM-generated test procedures and results only waste human time.
+
+Before sending a patch
+----------------------
+
+* **Check the development branch**
+
+* **Check the mailing list**
+
+If your bug was found by an LLM, someone else may have already found, or even
+fixed, it.
diff --git a/MAINTAINERS b/MAINTAINERS
index 44540a1eb2b8..55f0b3dca133 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5838,9 +5838,11 @@ S:	Maintained
 W:	https://btrfs.readthedocs.io
 Q:	https://patchwork.kernel.org/project/linux-btrfs/list/
 C:	irc://irc.libera.chat/btrfs
+P:	Documentation/process/maintainer-btrfs.rst
 T:	git https://github.com/btrfs/linux.git for-next
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
 F:	Documentation/filesystems/btrfs.rst
+F:	Documentation/process/maintainer-btrfs.rst
 F:	fs/btrfs/
 F:	include/linux/btrfs*
 F:	include/trace/events/btrfs.h
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: add a maintainer entry profile
  2026-11-25  4:46 [PATCH] btrfs: add a maintainer entry profile Qu Wenruo
@ 2026-11-26 13:37 ` Leon Romanovsky
  2026-11-26 15:51 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2026-11-26 13:37 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs, workflows, linux-doc

On Wed, Nov 25, 2026 at 03:16:21PM +1030, Qu Wenruo wrote:
> This new file is mostly based on my personal preferences, focusing on
> how to improve the human readability in the LLM era.
> 
> The new file should also act as a guide for humans that want to be a
> long term contributor to btrfs.

My previous comment still applies. Most of it is relevant to other
subsystems as well, and some of the suggestions duplicate existing
documentation.

> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
> Changelog:
> RFC->v1:
> - Use maintainer entry profile instead of agent.md
> 
> - Further simplfy the content for human readers
> 
> ---
>  Documentation/process/maintainer-btrfs.rst | 154 +++++++++++++++++++++
>  MAINTAINERS                                |   2 +
>  2 files changed, 156 insertions(+)
>  create mode 100644 Documentation/process/maintainer-btrfs.rst
> 
> diff --git a/Documentation/process/maintainer-btrfs.rst b/Documentation/process/maintainer-btrfs.rst
> new file mode 100644
> index 000000000000..5170dd73e655
> --- /dev/null
> +++ b/Documentation/process/maintainer-btrfs.rst
> @@ -0,0 +1,154 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +Btrfs patch guidelines
> +======================
> +
> +Human readability comes first. A reviewer should be able to understand the
> +problem and the fix from the message and code.
> +
> +Bloated LLM-generated information only wastes precious human time, no matter
> +whether it is in a comment or a commit message.

This is general.

> +
> +Code comments
> +-------------
> +
> +* **Necessary comment only**
> +
> +  Comment is for things that are not obvious by itself, e.g. a locking
> +  rule, an ordering requirement or a non-trivial reason for a workaround.
> +
> +  Keep the comment short if possible.
> +
> +  Don't repeat what the code does.

General too.

> +
> +* **Add kernel-doc only for complex and/or exported functions**
> +
> +  If the function and parameter names are self-explaining, don't waste words
> +  on the kernel-doc.

This is applicable to many subsystems, but probably not general.

> +
> +Commit messages and cover letters
> +---------------------------------
> +
> +* **Keep it simple**
> +
> +  Use short and simple sentences, avoid long paragraphs.
> +
> +  Simple patch for simple bug. Don't write a full [BUG] [CAUSE] [FIX] analysis
> +  for something like a simple error handling enhancement.
> +
> +  And we don't care how you or your LLM found the bug unless it's hit in the
> +  real world, so don't put such information even after the "---" line.

General

> +
> +* **Prefer visual aids over long sentences**
> +
> +  See "Visual aids" section below.

General

> +
> +* **Follow the style of well-known btrfs developers**
> +
> +  Check ``git log -- fs/btrfs`` for recent examples before drafting.

General

> +
> +Visual aids
> +-----------
> +
> +Prefer visual aids like an ASCII chart over words, e.g.:
> +
> +* A race. Show the race window, do not describe it in prose only.
> +* An error handling bug in a function, seen from several call sites.
> +* A call chain across layers, where the bug only shows on a certain path.
> +
> +Example, a race::
> +
> +   CPU0 (endio)                       CPU1 (fsync)
> +   end_bbio_data_write()
> +   |-btrfs_folio_clear_writeback()
> +   |                                  btrfs_sync_file()
> +   |                                  |-filemap_fdatawait_range()
> +   |                                  | Returns after writeback finished
> +   |                                  |
> +   |                                  \-test_and_clear_bit(COW_WRITE_ERROR)
> +   |                                    Still 0, skips waiting
> +   \-set_bit(COW_WRITE_ERROR)
> +     Too late.
> +
> +Example, an error handling bug, from commit c9583ada8cc4. The callee cleans up
> +on error, then the caller cleans up again::
> +
> +   btrfs_do_readpage()
> +   |-submit_extent_page()
> +   | \-submit_one_bio()
> +   |   \-btrfs_submit_data_bio()
> +   |     \-bio_endio()
> +   |       Calls end_page_read() and unlock_extent().
> +   |
> +   \-end_page_read() and unlock_extent()
> +     Cleaned up again, the subpage reader count underflows.

General

> +
> +Versioned patches
> +-----------------
> +
> +* **Full history**
> +
> +  Include all versions, not only the changes of the last version.

General

> +
> +* **Newest version first**
> +
> +  E.g.::
> +
> +    v3:
> +    - Rename the helper to xxx()
> +    - Add a missing lock in yyy()
> +
> +    v2:
> +    - Fix the build failure on 32-bit
> +
> +* **Changelog location**
> +
> +  Put it in the cover letter for a patch series, or after the "---" line for
> +  a single patch.
> +
> +  Don't put it in the commit message body.

General

> +
> +Review
> +------
> +
> +* **Follow the review**
> +
> +  Don't send a patch and just forget it. If you're not a well known developer,
> +  it's uncommon to get merged on the first try.
> +
> +  One will need to communicate with the reviewers to get at least one review
> +  from a well known btrfs developer, before getting the patch merged.
> +
> +* **Check Sashiko**
> +
> +  Sashiko posts AI-generated review for patches sent to the mailing list. The
> +  btrfs list is at https://sashiko.dev/#/?list=org.kernel.vger.linux-btrfs
> +
> +  If a report is valid, address it in a newer version.
> +
> +  If a report is obviously wrong, it can be ignored. If the report is wrong but
> +  the reason is not obvious, explaining it on the mailing list can help.
> +
> +Testing
> +-------
> +
> +* **Run full fstests**
> +
> +  That's the main test suite we use.
> +
> +* **Testing procedures and results are only for complex patches**
> +
> +  Simple fixes shouldn't need a long paragraph on how to verify the fix.
> +  Those simple fixes should be explained well by the commit message and code.
> +
> +  Bloated LLM-generated test procedures and results only waste human time.
> +
> +Before sending a patch
> +----------------------
> +
> +* **Check the development branch**
> +
> +* **Check the mailing list**
> +
> +If your bug was found by an LLM, someone else may have already found, or even
> +fixed, it.
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 44540a1eb2b8..55f0b3dca133 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -5838,9 +5838,11 @@ S:	Maintained
>  W:	https://btrfs.readthedocs.io
>  Q:	https://patchwork.kernel.org/project/linux-btrfs/list/
>  C:	irc://irc.libera.chat/btrfs
> +P:	Documentation/process/maintainer-btrfs.rst
>  T:	git https://github.com/btrfs/linux.git for-next
>  T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
>  F:	Documentation/filesystems/btrfs.rst
> +F:	Documentation/process/maintainer-btrfs.rst
>  F:	fs/btrfs/
>  F:	include/linux/btrfs*
>  F:	include/trace/events/btrfs.h
> -- 
> 2.56.1
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: add a maintainer entry profile
  2026-11-25  4:46 [PATCH] btrfs: add a maintainer entry profile Qu Wenruo
  2026-11-26 13:37 ` Leon Romanovsky
@ 2026-11-26 15:51 ` David Sterba
  2026-11-26 20:16   ` Qu Wenruo
  1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2026-11-26 15:51 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs, workflows, linux-doc

On Wed, Nov 25, 2026 at 03:16:21PM +1030, Qu Wenruo wrote:
> This new file is mostly based on my personal preferences, focusing on
> how to improve the human readability in the LLM era.
> 
> The new file should also act as a guide for humans that want to be a
> long term contributor to btrfs.

I understandthe motivation but I'm not sure this is the right way. I've
avoided adding the maintainer profile and rather created and updated the
pages in the web documentation,
https://btrfs.readthedocs.io/en/latest/dev/Developer-s-FAQ.html . It's
burried so we can make it more visible, but the visibility problem
applies to the maintainer profile too. The ones who know it exists and
where to find it are rare. IME it always ends up replying to mails with
the link.

I'd rather keep full contribution documentation on the RTD site, this is
more flexible to update. As a compromise we can add the maintainer
profile and add link to the page. We can eventually mention some key
differences from other subsystems to the maintainer file too, but as
Leon also noted there's an overlap and lots of General information.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: add a maintainer entry profile
  2026-11-26 15:51 ` David Sterba
@ 2026-11-26 20:16   ` Qu Wenruo
  0 siblings, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-11-26 20:16 UTC (permalink / raw)
  To: dsterba; +Cc: linux-btrfs, workflows, linux-doc



在 2026/11/27 02:21, David Sterba 写道:
> On Wed, Nov 25, 2026 at 03:16:21PM +1030, Qu Wenruo wrote:
>> This new file is mostly based on my personal preferences, focusing on
>> how to improve the human readability in the LLM era.
>>
>> The new file should also act as a guide for humans that want to be a
>> long term contributor to btrfs.
> 
> I understandthe motivation but I'm not sure this is the right way. I've
> avoided adding the maintainer profile and rather created and updated the
> pages in the web documentation,
> https://btrfs.readthedocs.io/en/latest/dev/Developer-s-FAQ.html . It's
> burried so we can make it more visible, but the visibility problem
> applies to the maintainer profile too. The ones who know it exists and
> where to find it are rare. IME it always ends up replying to mails with
> the link.

It looks like LLM will follow the existing AGENT.md and reach this 
maintainer's profile.

> 
> I'd rather keep full contribution documentation on the RTD site, this is
> more flexible to update. As a compromise we can add the maintainer
> profile and add link to the page. We can eventually mention some key
> differences from other subsystems to the maintainer file too, but as
> Leon also noted there's an overlap and lots of General information.

I can try to push the general ones, but so far I'd say the upstream RTD 
doc is not followed by LLM/human either.

So at least the profile looks one step better than the existing RTD.

Thanks,
Qu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-26 20:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  4:46 [PATCH] btrfs: add a maintainer entry profile Qu Wenruo
2026-11-26 13:37 ` Leon Romanovsky
2026-11-26 15:51 ` David Sterba
2026-11-26 20:16   ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox