mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hyunchul Lee <hyc.lee@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Hyunchul Lee <hyc.lee@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/7] ntfs: Support Windows native symbolic links
Date: Mon, 15 Jun 2026 08:49:51 +0900	[thread overview]
Message-ID: <20260615-topic-symlink-v2-0-648a769d01f8@gmail.com> (raw)

This patch series adds support for Windows native symbolic links and
introduces mount options to configure how symbolic links are resolved
and created.

Currently, the NTFS driver creates WSL-compatible symbolic links and
has limited support for native Windows symbolic links. This series
addresses these limitations.

1. Following/Resolving Symlinks & Junctions:
  - Add support for parsing and following Windows native symbolic links.
  - Introduce the "native_symlink=raw|rel" mount option to configure
    absolute target resolution.

2. Creating Symlinks:
  - Introduce the "symlink=wsl|native" mount option to choose the
    creation behavior of symlinks. Under "native", Windows native
    symbolic links are created by converting the target path to UTF-16
    Windows format.

3. Fixes & Cleanups:
  - Fix an issue where the size of symbolic links is reported as 0.
  - Clean up target name conversion for WSL symlinks by avoiding
    redundant conversion.

4. Documentation:
  - Document the newly introduced mount options in ntfs.rst.

Changes since v1:
- Add a boundary check to verify that reparse point attribute size is
  at least the size of the `reparse_point`.
- Fix target inode fields (`reparse_tag`, `reparse_flags`) not being
  updated `ntfs_reparse_set_wsl_symlink()`,
  `ntfs_reparse_set_wsl_not_symlink()`, and
  `ntfs_set_ntfs_reparse_data()`.
- Improve absolute path validation in `ntfs_reparse_set_native_symlink()`
  by ensuring that absolute paths actually start with a valid drive
  letter and a path separator.
- Optimize memory allocations in `ntfs_reparse_set_native_symlink()` by
  sharing the same buffer for print name and substitute name in the
  relative symlink path.

Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
---
Hyunchul Lee (7):
      ntfs: fix incorrect size of symbolic link
      ntfs: support following Windows native symlink with relative paths
      ntfs: support following Windows native symlink with absolute paths
      ntfs: add native_symlink mount option
      ntfs: clean up target name conversion for WSL symlinks
      ntfs: support creating Windows native symlinks
      docs/fs/ntfs: add mount options to support Windows native symbolic links

 Documentation/filesystems/ntfs.rst |  13 +
 fs/ntfs/file.c                     |  24 +-
 fs/ntfs/inode.c                    |  49 ++--
 fs/ntfs/inode.h                    |   2 +
 fs/ntfs/layout.h                   |  19 ++
 fs/ntfs/namei.c                    |  22 +-
 fs/ntfs/reparse.c                  | 476 +++++++++++++++++++++++++++++++++----
 fs/ntfs/reparse.h                  |   6 +-
 fs/ntfs/super.c                    |  38 +++
 fs/ntfs/volume.h                   |   5 +
 10 files changed, 577 insertions(+), 77 deletions(-)
---
base-commit: 5aec1efb11ab2a87d1e4be063830268f7980ec4a
change-id: 20260612-topic-symlink-d70873e4721e

Best regards,
-- 
Thanks,
Hyunchul


             reply	other threads:[~2026-06-14 23:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14 23:49 Hyunchul Lee [this message]
2026-06-14 23:49 ` [PATCH v2 1/7] ntfs: fix incorrect size of symbolic link Hyunchul Lee
2026-06-14 23:49 ` [PATCH v2 2/7] ntfs: support following Windows native symlink with relative paths Hyunchul Lee
2026-06-14 23:49 ` [PATCH v2 3/7] ntfs: support following Windows native symlink with absolute paths Hyunchul Lee
2026-06-14 23:49 ` [PATCH v2 4/7] ntfs: add native_symlink mount option Hyunchul Lee
2026-06-14 23:49 ` [PATCH v2 5/7] ntfs: clean up target name conversion for WSL symlinks Hyunchul Lee
2026-06-14 23:49 ` [PATCH v2 6/7] ntfs: support creating Windows native symlinks Hyunchul Lee
2026-06-14 23:49 ` [PATCH v2 7/7] docs/fs/ntfs: add mount options to support Windows native symbolic links Hyunchul Lee
2026-06-15 23:57 ` [PATCH v2 0/7] ntfs: Support " Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260615-topic-symlink-v2-0-648a769d01f8@gmail.com \
    --to=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®