New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pacific: cephfs: Add ceph-dokan, providing Windows support #40069
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cephfs will use fake inodes when sizeof(ino_t) < 8. On Windows, ino_t is defined as unsigned short (2B), which isn't enough. On the other hand, most "native" Windows structures, including the Dokan ones, are using 64b identifiers. That being considered, we'll disable inode emulation on Windows. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> (cherry picked from commit 618a340)
We're adding a new libcephfs function: ceph_may_delete. It checks if the mount permissions allow deleting a file or directory, without actually deleting it. This will allow us to drop the redundant permission checks at ceph-dokan level, saving about 1500 LOC. Note that the "DeleteFile" Dokan callback expects us to say if a delete operation is allowed. The "Cleanup" callback is supposed to perform the actual file or directory deletion. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> (cherry picked from commit 439add6)
In order to expose ceph filesystems to Windows hosts, we propose including ceph-dokan[1][2] in the Ceph tree, while updating it to work with the latest CephFS and Dokany APIs. Dokany is a well maintained project (fork of the original Dokan project), allowing filesystems to be implemented in userspace, even providing a Fuse compatibility layer. One reason for not using the FUSE compatibility layer is that it's only covering the high level API while Ceph is using the low level FUSE API, which among other things is inode centric. Changes made by this patch compared to the upstream ceph-dokan: * support latest stable Dokany API. The upstream version relies on the legacy unmaintained Dokan API * return proper error codes, converting standard errno.h values to NTSTATUS * minor changes to support latest cephfs API * drop duplicated ceph code, no longer needed if we're to include it in tree. This makes it much easier to maintain. * drop redundant permission checks, leaving it up to libcephfs * use ceph argparse helpers * use ceph logging and daemon initialization * fixed unicode handling * switched to ceph coding style * made ceph.conf param optional, using the default path if available * enabled setting file timestamps * append support * configurable timeouts set once per mount * ensure that the error code is always logged * various cleanups (removed unused entry points, checks that have been moved to dokany, simplified conditional statements, unnecessary conversions in the hot path, etc). [1] https://github.com/ketor/ceph-dokan [2] https://github.com/ceph/ceph-dokan Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> (cherry picked from commit af6b373)
This change documents ceph-dokan, describing the prerequisites, usage and limitations. Some of this was mentioned in README.windows.rst but is now being moved to the Ceph doc pages. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> (cherry picked from commit eaa415f)
github-actions
bot
added
build/ops
cephfs
Ceph File System
common
documentation
pybind
labels
Mar 12, 2021
I've also included https://tracker.ceph.com/issues/49608 #39354 since we're using those error codes here. Please let me know if those should be two separate PRs. |
In order to avoid overcomplicating the ceph cmake files, we're picking make targets individually. This is quite inefficient. Ninja can improve the build concurrency, reducing the build duration by almost 50%. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> (cherry picked from commit fca903f)
Replace system errno macros with cephfs aliases Fixes: https://tracker.ceph.com/issues/48802 Signed-off-by: Milind Changire <mchangir@redhat.com> (cherry picked from commit 7e7d9e4)
Most of the Windows documentation is currently included in the README.windows.rst file. To make it more accessible, we're moving most of it to the "doc/" folder, adding the following pages: * Installing Ceph on Windows * RBD on Windows * Windows troubleshooting We'll keep the build and manual install instructions in README.windows.rst. Note that ceph-dokan already has a separate doc page. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> (cherry picked from commit 76a38a6)
petrutlucian94
force-pushed
the
wip-49634-pacific
branch
from
March 17, 2021 07:11
c8b1f8e
to
e1a0821
Compare
Instead of having a direct download link, we'll point to the download page, which will eventually contain other MSI versions as well (e.g. Quincy). While at it, we're simplifying the document a bit, dropping information that's also included in the manual install guide. Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
batrick
approved these changes
Mar 25, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build/ops
cephfs
Ceph File System
common
documentation
needs-qa
pacific-batch-1
pybind
wip-yuri5-testing
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/49634
backport of #38819
parent tracker: https://tracker.ceph.com/issues/49623
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh