btrfs-progs: doc: fix btrfs-inspect-internal rootid doc
diff mbox

Message ID 453da244-de65-e58b-ef28-f6dbff093052@jp.fujitsu.com
State New
Headers show

Commit Message

Misono Tomohiro Aug. 24, 2017, 7:39 a.m. UTC
"btrfs inspect-internal rootid <path>" rejects a file to be specified in 
the implementation.
Therefore change "file or directory" to "directory" in the doc.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
---
   Documentation/btrfs-inspect-internal.asciidoc | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)

   NOTE: The result is undefined for the so-called empty subvolumes 
(identified by
--
2.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Qu Wenruo Aug. 24, 2017, 7:46 a.m. UTC | #1
On 2017年08月24日 15:39, Misono, Tomohiro wrote:
> "btrfs inspect-internal rootid <path>" rejects a file to be specified in 
> the implementation.
> Therefore change "file or directory" to "directory" in the doc.
> 
> Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
> ---
>    Documentation/btrfs-inspect-internal.asciidoc | 2 +-
>    1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/btrfs-inspect-internal.asciidoc
> b/Documentation/btrfs-inspect-internal.asciidoc
> index 62b1029..a1ed1a3 100644
> --- a/Documentation/btrfs-inspect-internal.asciidoc
> +++ b/Documentation/btrfs-inspect-internal.asciidoc
> @@ -136,7 +136,7 @@ resize operation, this may be useful before 
> executing the actual resize operatio
>    specify the device 'id' to query, default is 1 if this option is not 
> used
> 
>    *rootid* <path>::

What about changing "<path>" to "<directory>"?

Thanks,
Qu

> -for a given file or directory, return the containing tree root id, for a
> +for a given directory, return the containing tree root id, for a
>    subvolume itself return it's own tree id (ie. subvol id)
>    +
>    NOTE: The result is undefined for the so-called empty subvolumes 
> (identified by
> -- 
> 2.9.5
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba Aug. 24, 2017, 5:37 p.m. UTC | #2
On Thu, Aug 24, 2017 at 04:39:53PM +0900, Misono, Tomohiro wrote:
> "btrfs inspect-internal rootid <path>" rejects a file to be specified in 
> the implementation.
> Therefore change "file or directory" to "directory" in the doc.

Is there a reason why a file should not be accepted? The ioctl supports
that just fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Misono Tomohiro Aug. 25, 2017, 12:34 a.m. UTC | #3
On 2017/08/25 2:37, David Sterba wrote:
> On Thu, Aug 24, 2017 at 04:39:53PM +0900, Misono, Tomohiro wrote:
>> "btrfs inspect-internal rootid <path>" rejects a file to be specified in
>> the implementation.
>> Therefore change "file or directory" to "directory" in the doc.
> 
> Is there a reason why a file should not be accepted? The ioctl supports
> that just fine.
> 
> 

I thought ioctl would work for file, but current code checks whether 
<path> is directory or not in the first place. So, I change the doc.

If it is better to change the code rather than the doc, I will do that. 
What do you think?

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba Sept. 1, 2017, 4:21 p.m. UTC | #4
On Fri, Aug 25, 2017 at 09:34:49AM +0900, Misono, Tomohiro wrote:
> On 2017/08/25 2:37, David Sterba wrote:
> > On Thu, Aug 24, 2017 at 04:39:53PM +0900, Misono, Tomohiro wrote:
> >> "btrfs inspect-internal rootid <path>" rejects a file to be specified in
> >> the implementation.
> >> Therefore change "file or directory" to "directory" in the doc.
> > 
> > Is there a reason why a file should not be accepted? The ioctl supports
> > that just fine.
> 
> I thought ioctl would work for file, but current code checks whether 
> <path> is directory or not in the first place. So, I change the doc.
> 
> If it is better to change the code rather than the doc, I will do that. 
> What do you think?

There are helpers that can open either file or directory from a given
path, eg. open_file_or_dir3 so it can be used.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/Documentation/btrfs-inspect-internal.asciidoc
b/Documentation/btrfs-inspect-internal.asciidoc
index 62b1029..a1ed1a3 100644
--- a/Documentation/btrfs-inspect-internal.asciidoc
+++ b/Documentation/btrfs-inspect-internal.asciidoc
@@ -136,7 +136,7 @@  resize operation, this may be useful before 
executing the actual resize operatio
   specify the device 'id' to query, default is 1 if this option is not used

   *rootid* <path>::
-for a given file or directory, return the containing tree root id, for a
+for a given directory, return the containing tree root id, for a
   subvolume itself return it's own tree id (ie. subvol id)
   +