mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: Paulo Alcantara <pc@manguebit.org>,
	linux-cifs@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7.3 9/9] cifs: Add support for creating WSL symlinks in version 1 format
Date: Tue, 27 Oct 2026 10:38:14 +0900	[thread overview]
Message-ID: <CAKYAXd8jXSFn2y+0U-owq7p+Yxmrw5HB2-Roxbr7JNcwds2Dow@mail.gmail.com> (raw)
In-Reply-To: <20261026222600.17323-10-pali@kernel.org>

> @@ -708,7 +716,7 @@ static int wsl_set_xattrs(struct inode *inode, umode_t _mode,
>  static int mknod_wsl(unsigned int xid, struct inode *inode,
>                      struct dentry *dentry, struct cifs_tcon *tcon,
>                      const char *full_path, umode_t mode, dev_t dev,
> -                    const char *symname)
> +                    const char *symname, int symver)
>  {
>         struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
>         struct cifs_open_info_data data;
> @@ -717,6 +725,12 @@ static int mknod_wsl(unsigned int xid, struct inode *inode,
>         struct inode *new;
>         unsigned int len;
>         struct kvec reparse_iov, xattr_iov;
> +       struct cifs_open_parms oparms;
> +       struct cifs_io_parms io_parms;
> +       unsigned int bytes_written;
> +       struct kvec symv1_iov[2];
> +       struct cifs_fid fid;
> +       __u32 oplock;
>         int rc;
>
>         /*
> @@ -726,7 +740,7 @@ static int mknod_wsl(unsigned int xid, struct inode *inode,
>         if (!(le32_to_cpu(tcon->fsAttrInfo.Attributes) & FILE_SUPPORTS_EXTENDED_ATTRIBUTES))
>                 return -EOPNOTSUPP;
>
> -       rc = wsl_set_reparse_buf(&buf, mode, symname, cifs_sb, &reparse_iov);
> +       rc = wsl_set_reparse_buf(&buf, mode, symname, symver, cifs_sb, &reparse_iov);
>         if (rc)
>                 return rc;
>
> @@ -751,6 +765,45 @@ static int mknod_wsl(unsigned int xid, struct inode *inode,
>                                      &data, inode->i_sb,
>                                      xid, tcon, full_path, false,
>                                      &reparse_iov, &xattr_iov);
> +       if (!IS_ERR(new) && mode == S_IFLNK && symver == 1) {
> +               /*
> +                * WSL symlink layout version 1 stores the symlink target
> +                * location into the data section of the file.
> +                * Store it now after the reparse point file was created.
> +                * The target location was allocated into the buf but iov
> +                * size filled in reparse_iov by wsl_set_reparse_buf() was
> +                * set to smaller so the created reparse point does not
> +                * contain it.
> +                */
> +               oparms = CIFS_OPARMS(cifs_sb, tcon, full_path, FILE_WRITE_DATA,
> +                                    FILE_OPEN, CREATE_NOT_DIR | OPEN_REPARSE_POINT,
> +                                    ACL_NO_MODE);
> +               oparms.fid = &fid;
It is the same here. we need to initialize fid and call new_lease_key().


> +               oplock = tcon->ses->server->oplocks ? REQ_OPLOCK : 0;
> +               rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL);

  reply	other threads:[~2026-10-27  1:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 22:25 [PATCH v7.3 0/9] Various changes Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 1/9] cifs: Remove code for querying FILE_INFO_STANDARD via CIFSSMBQPathInfo() Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 2/9] cifs: Remove cifs_backup_query_path_info() and replace it by cifs_query_path_info() Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 3/9] cifs: Fix validation of EAs for WSL reparse points Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 4/9] cifs: Validate presence of EA $LXMOD " Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 5/9] cifs: Check if server supports EAs before trying to set it for WSL Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 6/9] cifs: Extend ->set_EA() callback to allow operate on reparse point Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 7/9] cifs: Create native Window socket file compatible also with WSL subsystem Pali Rohár
2026-10-26 22:25 ` [PATCH v7.3 8/9] cifs: Add support for parsing WSL symlinks in version 1 format Pali Rohár
2026-10-27  1:37   ` Namjae Jeon
2026-10-28 23:45     ` Pali Rohár
2026-10-29  0:47       ` Namjae Jeon
2026-10-26 22:26 ` [PATCH v7.3 9/9] cifs: Add support for creating " Pali Rohár
2026-10-27  1:38   ` Namjae Jeon [this message]
2026-10-27  1:42 ` [PATCH v7.3 0/9] Various changes Namjae Jeon
2026-10-29  0:49 ` Namjae Jeon
2026-11-20 13:31   ` Pali Rohár

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=CAKYAXd8jXSFn2y+0U-owq7p+Yxmrw5HB2-Roxbr7JNcwds2Dow@mail.gmail.com \
    --to=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=pc@manguebit.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®