Skip to content

Add option to disable the concurrent write protection#1584

Merged
dhalbert merged 3 commits into
adafruit:masterfrom
tannewt:disable_concurrent_write_protection
Feb 21, 2019
Merged

Add option to disable the concurrent write protection#1584
dhalbert merged 3 commits into
adafruit:masterfrom
tannewt:disable_concurrent_write_protection

Conversation

@tannewt
Copy link
Copy Markdown
Member

@tannewt tannewt commented Feb 21, 2019

This allows writing to the filesystem from the host computer and
CircuitPython by increasing the risk of filesystem corruption.

This allows writing to the filesystem from the host computer and
CircuitPython by increasing the risk of filesystem corruption.
Copy link
Copy Markdown
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unix coverage build is failing with:

build-coverage/extmod/vfs_fat_file.o: In function `file_open':
vfs_fat_file.c:(.text+0x6fd): undefined reference to `filesystem_is_writable_by_python'
collect2: error: ld returned 1 exit status

Comment thread shared-bindings/storage/__init__.c Outdated
//|

//| .. function:: mount(filesystem, mount_path, \*, readonly=False)
//| .. function:: mount(filesystem, mount_path, \*, readonly=False, disable_concurrent_write_protection=False)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable_concurrent_write_protection is listed as a new arg here for mount(), but it's not implemented. Did you mean to add it as with remount(), or is this a typo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, a bug. I thought I had fixed that but probably forgot to save.

Comment thread supervisor/shared/filesystem.c
Comment thread supervisor/shared/filesystem.c
@dhalbert dhalbert merged commit d218069 into adafruit:master Feb 21, 2019
@gitcnd
Copy link
Copy Markdown

gitcnd commented Jun 24, 2024

Was there a reason for this? The FS is managed by USB_MSC and thus should not be able to get corrupted.

update: probably "yes" is the answer: https://forums.adafruit.com/viewtopic.php?p=1020232#p1020232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants