Skip to content

Conversation

@crafcat7
Copy link
Contributor

Summary

Add FIOC_FILEPATH to LFS ioctl

Impact

LFS ioctl adds FIOC_FILEPATH for file paths

Testing

local test PASS

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor

@crafcat7 let's put littlefs patch in the same patch to avoid the ci break.

@crafcat7
Copy link
Contributor Author

@crafcat7 let's put littlefs patch in the same patch to avoid the ci break.

Okay, I'll sort out the relevant changes and add them in

@jturnsek
Copy link
Contributor

Missing lfs_file_path

@crafcat7
Copy link
Contributor Author

Missing lfs_file_path

Please try to compile it again with the latest changes, I submitted an implementation of lfs_file_path for littlefs.

@jturnsek
Copy link
Contributor

Missing lfs_file_path

Please try to compile it again with the latest changes, I submitted an implementation of lfs_file_path for littlefs.

It works now. Thanks.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 7b37dd1 into apache:master Feb 21, 2024
@yamt
Copy link
Contributor

yamt commented Apr 30, 2024

@crafcat7 have you submitted the littlefs patch to the upstream? i don't think it's a good idea to maintain it in nuttx.

@crafcat7
Copy link
Contributor Author

crafcat7 commented Apr 30, 2024

@crafcat7 have you submitted the littlefs patch to the upstream? i don't think it's a good idea to maintain it in nuttx.

I sorted out the new interfaces for obtaining paths and submitted them here.
littlefs-project/littlefs#976

@yamt
Copy link
Contributor

yamt commented May 7, 2024

is this functionality mainly for #11724 ?

@crafcat7
Copy link
Contributor Author

crafcat7 commented May 7, 2024

is this functionality mainly for #11724 ?

The current implementation of filelock still relies on getting the path to the file to determine the target. So if we want to use filelock on a file on littlefs, we need a way to get the path to the target file.
In addition to this, there are implementations such as “fdinfo” that should also rely on getting the path to the file.
Therefore I think this should be a general implementation, which may be used in many functions

@xiaoxiang781216
Copy link
Contributor

is this functionality mainly for #11724 ?

Yes, otherwise we need save path into file handle.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants