site_archiver(a)lists.apple.com
Delivered-To: darwin-kernel(a)lists.apple.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=mBbpXYF4P+mKblGZsxZh/vkg4MhGERORIvhpoqXek2o=; b=sTh7r2yhm0FmPyNCDjnvTkfIlNz2u2P1xMUGxaFAAqVA5UMabBQ/G5V/yeCod458MF Ytd1jUqDyUnnN/7lO093hregsN5CToWzHgNnnNKJzdTYRkEdQ1aJBUhf9SOXY2FKuKPn RCtp7wfRhpKUExdZzCiD2sN0IiON667mDdVxQ1l4UZoUfuGCyf4B/4QWTZh6Py5rOq5y jCNh3sfr63yCpfmNq1XZuiyyfqG6gHfNAKeddvGflf4umgk5TULErBv7cvyEjETtQeR8 KI/b+xsChvmA3wnOFwLn8E2ay0YgQSVjG6q4tMAmT0P8oV+3Kt+hBB3x9a98lca/xk08 ka+Q==
Hi Folks,
I writing the mail on behalf of GlobalTechEvent community. We just started
Telegram Channel where we are trying to post all Technical Related event
which is happening in India right now. If anyone would like to join this
channel. Please feel free to join the channel.
One more thing if anyone wants to post your Technical related event on our
channel you can also connect with @kavingates (on Telegram).
Our channel link - https://t.me/GlobalTechEvents
Kavin Gates - http://t.me/kavingates
Thanks in advance
Regards
Yash
TechEvents Team
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (Darwin-kernel(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com
site_archiver(a)lists.apple.com
Delivered-To: Darwin-kernel(a)lists.apple.com
Dkim-filter: OpenDKIM Filter v2.10.3 mail.lundman.net EE174152546
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=lundman.net; s=dkim; t=1541385405; bh=mE9ESBwusbpLCIa9tB4PkQMfeCaEpBq3O+dzW04WJA4=; h=To:From:Subject:Date; b=XTAuK2vwVlEZ8pUc07sEhiovQVaSNcCfY32U2iRX+pulLwhbTSHd/dPDKJ6oJGAfK fJiipjIp0j89ELlU8Ce5F3sWV2nnQFp6EFuyXjotKe1pjpzodTV/TfYRVDSlpbTZjV kFgMx+DBnAd9832GsW9+nikBHYImWn8HgwfUpgbI=
Openpgp: preference=signencrypt
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3
Hello,
Trying to add support to TRIM in filesystem. We have two paths through the
code, the classic BSD buf+vnode way to issue IO, the eventually ends up
calling:
error = VNOP_IOCTL(LH_VNODE(lhp), DKIOCUNMAP,
(caddr_t)&dkun, 0, context);
and confirmed to be sent to device by using:
# fs_usage -f filesys -w | egrep -i 'unmap|trim'
11:21:10.671663 TrimExtent D=0x00000001 B=0x8000000 /dev/disk1s1
0.000000 kernel_task.12741
11:21:10.671666 IOCTL <DKIOCUNMAP> /dev/disk1s1
0.000004 kernel_task.12741
so that appears to work.
The second path through the code is the IOKit way, which eventually drops
down to:
error = LH_MEDIA(lhp)->unmap(LH_CLIENT(lhp),
extents, dkm->dfl_num_exts, 0);
Here, nothing happens. Stepping through the kernel, it passes through a few
layers (about 4 layers from memory) in IOKit, before eventually calling:
IOSCSIBlockCommandsDevice::IsUnmapAllowed()
which returns failure. "trimforce" is enabled.
Since the method IsUnmapAllowed() takes no arguments, I assume it has
nothing to do with the extent array I pass it (I build it the same as XNU
sources does for DKIOCUNMAP).
One option would be to always call VNOP_IOCTL and ignore IOKit's unmap, but
it is not easy to do that (cleanly) when we have opened the device using IOkit.
Anything obvious I have missed? What are the criteria regarding
IsUnmapAllowed() ?
Lund
--
Jorgen Lundman | <lundman(a)lundman.net>
Unix Administrator | +81 (0)90-5578-8500
Shibuya-ku, Tokyo | Japan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (Darwin-kernel(a)lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists…
This email sent to site_archiver(a)lists.apple.com