linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: John <graysky@archlinux.us>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] fstrim does not recognize FSVER=1.13 of F2FS partitions
Date: Mon, 23 Mar 2020 08:02:05 -0700	[thread overview]
Message-ID: <20200323150205.GA119787@google.com> (raw)
In-Reply-To: <CAO_nJAYEGp1129PsFwMdU0ZdjC75DoL60nXhY7KaATgSPz-2DA@mail.gmail.com>

On 03/23, John wrote:
> On Mon, Mar 23, 2020 at 12:11 AM Jaegeuk Kim <jaegeuk@kernel.org> wrote:
> >
> > On 03/18, John wrote:
> > > On Mon, Mar 16, 2020 at 9:44 PM Chao Yu <yuchao0@huawei.com> wrote:
> > > >
> > > > On 2020/3/16 17:52, John wrote:
> > > > > On Sun, Mar 15, 2020 at 9:24 PM Chao Yu <yuchao0@huawei.com> wrote:
> > > > >>
> > > > >> What's your mount option and mkfs option on those two partitions, and what's
> > > > >> your kernel version?
> > > > >
> > > > > I am mounting the partitions with systemd like so (/etc/fstab entry):
> > > > >   LABEL=incoming         /incoming     f2fs  noauto,x-systemd.automount  0 0
> > > > >
> > > > > But I can reproduce this if I totally remove the entries within
> > > > > /etc/fstab, reboot, and mount manually like this:
> > > > >   mount LABEL=incoming /incoming
> > > >
> > > > However, the directory where you trigger trim is "/mnt/media"?
> > > >
> > > > Quoted:
> > > > "Invoking it manually on the newer one gives this:
> > > > # fstrim -v /mnt/media
> > > > fstrim: /mnt/media: the discard operation is not supported"
> >
> > Hmm, could you share cat /proc/mounts?
> 
> Since I posted, I have completely reformatted the Samsung 860 EVO 2TB.
> Now, it is just a single LUKS partition with f2fs.  I am getting the
> same "fstrim: /mnt/media: the discard operation is not supported"
> error when I try using fstrim -v /mnt/media with it.
> 
> Here is cat /proc/mounts, thank you for the consideration:
> proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
> sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
> dev /dev devtmpfs rw,nosuid,relatime,size=3903292k,nr_inodes=975823,mode=755 0 0
> run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
> efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
> /dev/sda2 / ext4 rw,relatime 0 0
> securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
> tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
> devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
> tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
> cgroup2 /sys/fs/cgroup/unified cgroup2
> rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
> cgroup /sys/fs/cgroup/systemd cgroup
> rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
> pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
> none /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
> cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
> cgroup /sys/fs/cgroup/perf_event cgroup
> rw,nosuid,nodev,noexec,relatime,perf_event 0 0
> cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
> cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
> cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
> cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
> cgroup /sys/fs/cgroup/cpu,cpuacct cgroup
> rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
> cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
> cgroup /sys/fs/cgroup/net_cls,net_prio cgroup
> rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
> cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
> cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
> systemd-1 /proc/sys/fs/binfmt_misc autofs
> rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12920
> 0 0
> hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
> mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
> debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
> tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
> tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
> configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
> systemd-1 /mnt/media autofs
> rw,relatime,fd=49,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14523
> 0 0
> tmpfs /scratch tmpfs rw,lazytime,nodev,relatime,size=6291456k 0 0
> nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
> /dev/mapper/media-crypt /mnt/media f2fs
> rw,lazytime,relatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix

- media-crypt means dm-crypt? Any chance to try raw sda?

Could you try this?
- mount -o remount,nodiscard
 : The reason is, as f2fs uses async discard feature with -o discard, it doesn't
   give 0 bytes on fstrim sometimes.

> 0 0
> /dev/mapper/media-crypt /srv/nfs/share f2fs
> ro,lazytime,relatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix
> 0 0
> sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
> tmpfs /run/user/1000 tmpfs
> rw,nosuid,nodev,relatime,size=782676k,mode=700,uid=1000,gid=100 0 0


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2020-03-23 15:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-14 18:09 [f2fs-dev] fstrim does not recognize FSVER=1.13 of F2FS partitions John
2020-03-16  1:24 ` Chao Yu
2020-03-16  9:52   ` John
2020-03-17  1:44     ` Chao Yu
2020-03-18 20:25       ` John
2020-03-23  4:11         ` Jaegeuk Kim
2020-03-23 10:27           ` John
2020-03-23 15:02             ` Jaegeuk Kim [this message]
2020-03-23 20:12               ` John
2020-03-24  2:32                 ` Chao Yu
     [not found]                   ` <CAO_nJAYWQWrWaQVfUmVpJGFtOeKKE76im-AkLUDTJm8DN4VAgA@mail.gmail.com>
     [not found]                     ` <2292eb8d-8357-227f-5448-d1d03b33c042@huawei.com>
2020-03-25 13:58                       ` John
2020-03-25 15:28                         ` Jaegeuk Kim
2020-03-25 18:41                           ` John
2020-03-25 19:04                             ` John
2020-03-25 19:59                               ` Jaegeuk Kim
2020-03-25 21:13                                 ` John

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=20200323150205.GA119787@google.com \
    --to=jaegeuk@kernel.org \
    --cc=graysky@archlinux.us \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).