Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-12 Thread via GitHub
xiaoxiang781216 merged PR #16499: URL: https://github.com/apache/nuttx/pull/16499 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nu

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-11 Thread via GitHub
Donny9 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2963235865 > > > please add a commit message explaining the change > > > > > > could you point out which patch need more info? @jerpelea > > [4aaeb80](https://github.com/apache/nuttx

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-11 Thread via GitHub
jerpelea commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-296159 > > please add a commit message explaining the change > > could you point out which patch need more info? @jerpelea https://github.com/apache/nuttx/pull/16499/commits/4aaeb8

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-11 Thread via GitHub
xiaoxiang781216 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2961589925 > please add a commit message explaining the change could you point out which patch need more info? @jerpelea -- This is an automated message from the Apache Git Service.

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
Donny9 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2959482238 > please add a commit message to [0ec77cf](https://github.com/apache/nuttx/commit/0ec77cf1375923da6208322190849597075752ad) and change the title to tools/pynuttx: update fs.py base on new

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
Donny9 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2958604587 > > > Fix the race condition issues pointed out by @xiaoxiang781216 and then this is fine to merge by me. I will not review this any longer as this is not my code anymore. > > > >

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
Donny9 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2958601775 @jlaitine The changes made this time are indeed quite significant, involving modifications to the core relationship between file descriptors and file structures. We've made over 140 a

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
Donny9 commented on code in PR #16499: URL: https://github.com/apache/nuttx/pull/16499#discussion_r2137501582 ## fs/inode/fs_files.c: ## @@ -587,37 +621,138 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode, #endif } +/

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
pussuw commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2957958025 > > Fix the race condition issues pointed out by @xiaoxiang781216 and then this is fine to merge by me. I will not review this any longer as this is not my code anymore. > > The new

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
xiaoxiang781216 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2957935536 > Fix the race condition issues pointed out by @xiaoxiang781216 and then this is fine to merge by me. I will not review this any longer as this is not my code anymore. The

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
jlaitine commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2957885073 Why are the original patches, *which we tested to be working correctly*, partially re-written in this PR, instead of pointing out if there were errors in those in the closed PR? I

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-10 Thread via GitHub
xiaoxiang781216 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2957928622 > Why are the original patches, _which we tested to be working correctly_, partially re-written in this PR, instead of pointing out if there were errors in those in the closed PR?

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
xiaoxiang781216 commented on code in PR #16499: URL: https://github.com/apache/nuttx/pull/16499#discussion_r2136966092 ## fs/inode/fs_files.c: ## @@ -587,37 +621,138 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode, #endif } +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
Donny9 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2957568329 > need update app side too: > > ``` > kernel/fs/cases/fs_getfilep_test.c: In function 'test_nuttx_fs_getfilep01': > Error: kernel/fs/cases/fs_getfilep_test.c:75:9: error: implic

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
Donny9 commented on code in PR #16499: URL: https://github.com/apache/nuttx/pull/16499#discussion_r2136838430 ## fs/inode/fs_files.c: ## @@ -258,70 +292,43 @@ static void task_fssync(FAR struct tcb_s *tcb, FAR void *arg) * ***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
xiaoxiang781216 commented on PR #16499: URL: https://github.com/apache/nuttx/pull/16499#issuecomment-2956563766 need update app side too: ``` kernel/fs/cases/fs_getfilep_test.c: In function 'test_nuttx_fs_getfilep01': Error: kernel/fs/cases/fs_getfilep_test.c:75:9: error: implicit de

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
xiaoxiang781216 commented on code in PR #16499: URL: https://github.com/apache/nuttx/pull/16499#discussion_r2136222979 ## fs/inode/fs_files.c: ## @@ -587,37 +618,120 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode, #endif } +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2956208399 > > Hi @Donny9 it is not possible to add permissions to tiiuae/nuttx, you can push the patches to another branch and make a new PR. > > you don't give the full write permission of yo

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
pussuw closed pull request #16361: fs/vfs: Separate file descriptors from file descriptions URL: https://github.com/apache/nuttx/pull/16361 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specif

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
xiaoxiang781216 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2956158379 > Hi @Donny9 it is not possible to add permissions to tiiuae/nuttx, you can push the patches to another branch and make a new PR. you don't give the full write permission of

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
Donny9 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2955578742 @pussuw Hello, could you please grant me write permissions to your GitHub repository? I've made updates to the code locally and need to sync them up, but I'm currently encountering per

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-09 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2955595803 Hi @Donny9 it is not possible to add permissions to tiiuae/nuttx, you can push the patches to another branch and make a new PR. -- This is an automated message from the Apache Git Servic

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-05 Thread via GitHub
jlaitine commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2948240713 @xiaoxiang781216 , Could you elaborate a bit why can't this be integrated and further optimizations / cleanups done on top of this? Does this patchset break something? For me it i

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-05 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2945176351 > > I am experiencing kernel crashes related to sockets, sendmsg->psock_sendmsg . > > This PR solves the issue; is this now good to be merged? > > @Donny9 , @xiaoxiang781216 ? >

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-05 Thread via GitHub
xiaoxiang781216 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2945015695 > I am experiencing kernel crashes related to sockets, sendmsg->psock_sendmsg . > > This PR solves the issue; is this now good to be merged? > > @Donny9 , @xiaoxiang7

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-04 Thread via GitHub
jlaitine commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2939352629 I am experiencing kernel crashes related to sockets, sendmsg->psock_sendmsg . This PR solves the issue; is this now good to be merged? -- This is an automated message from th

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-02 Thread via GitHub
xiaoxiang781216 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2931222990 > Is this ready for merge? I have seen crashes probably caused by file descriptor race conditions. @Donny9 is testing and refining the patch, the verified patchset will be

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-06-01 Thread via GitHub
jpaali commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2929009120 Is this ready for merge? I have seen crashes probably caused by file descriptor race conditions. -- This is an automated message from the Apache Git Service. To respond to the message, p

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-23 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2904247947 > @pussuw please rebase this PR, i will try them on my local enviroment. ![image](https://private-user-images.githubusercontent.com/70748590/447002695-258943c5-b65a-4a2a-88b5-ccfce7f2b7f9.p

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-23 Thread via GitHub
Donny9 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2904196749 @pussuw please rebase this PR, i will try them on my local enviroment. ![image](https://github.com/user-attachments/assets/258943c5-b65a-4a2a-88b5-ccfce7f2b7f9) -- This is an auto

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-22 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2101941154 ## fs/inode/fs_files.c: ## @@ -858,6 +1026,342 @@ int fs_putfilep(FAR struct file *filep) } #endif +/

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-21 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2100055033 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-21 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2099903455 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-21 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2099685831 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-21 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2099685831 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2099203038 ## fs/inode/fs_files.c: ## @@ -858,6 +1026,342 @@ int fs_putfilep(FAR struct file *filep) } #endif +/

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2099170414 ## fs/inode/fs_files.c: ## @@ -858,6 +1026,342 @@ int fs_putfilep(FAR struct file *filep) } #endif +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097578555 ## fs/vfs/fs_ioctl.c: ## @@ -39,6 +40,15 @@ * Private Functions / +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097578555 ## fs/vfs/fs_ioctl.c: ## @@ -39,6 +40,15 @@ * Private Functions / +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
hujun260 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097993216 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097578555 ## fs/vfs/fs_ioctl.c: ## @@ -39,6 +40,15 @@ * Private Functions / +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097578555 ## fs/vfs/fs_ioctl.c: ## @@ -39,6 +40,15 @@ * Private Functions / +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097230197 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-20 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2097200315 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095136393 ## fs/vfs/fs_open.c: ## @@ -372,7 +372,7 @@ int file_open(FAR struct file *filep, FAR const char *path, int oflags, ...) if (ret >= OK) { - FS_ADD_BACKTR

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2891403355 > > So, I can't understand why need move fdsan/fdcheck to fcntl > > No need to move, the funtion nx_fcntl is just named very badly. But I'm finally starting to undestand wha

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095922616 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2891372442 > So, I can't understand why need move fdsan/fdcheck to fcntl No need to move, the funtion nx_fcntl is just named very badly. But I'm finally starting to undestand what you want me t

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095922616 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2891308759 > > > I tried to modify the fcntl/ioctl calls to separate fd and file requests. I don't think it is a good idea to modify/remove FIOC numbers. > > > > > > if so, why not

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2891276973 > > I tried to modify the fcntl/ioctl calls to separate fd and file requests. I don't think it is a good idea to modify/remove FIOC numbers. > > if so, why not keep implement in nx_i

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2891209631 > I tried to modify the fcntl/ioctl calls to separate fd and file requests. I don't think it is a good idea to modify/remove FIOC numbers. if so, why not keep implement in n

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095821342 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095207463 ## fs/vfs/fs_ioctl.c: ## @@ -43,7 +43,7 @@ * Name: file_vioctl / -static int file_vioct

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095591335 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFI

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095624051 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095624051 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095617002 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFI

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095597205 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFI

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095608918 ## include/nuttx/fs/ioctl.h: ## @@ -197,8 +197,6 @@ * configuration

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095605256 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095602534 ## fs/inode/fs_files.c: ## @@ -858,6 +1027,263 @@ int fs_putfilep(FAR struct file *filep) } #endif +/

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095592349 ## fs/inode/fs_files.c: ## @@ -858,6 +1027,263 @@ int fs_putfilep(FAR struct file *filep) } #endif +/***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095383461 ## include/nuttx/fs/ioctl.h: ## @@ -197,8 +197,6 @@ * configuration * OUT: N

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095515021 ## fs/vfs/fs_dup.c: ## @@ -65,29 +65,32 @@ int file_dup(FAR struct file *filep, int minfd, int flags) uint8_t f_tag_fdcheck; /* File owner fdcheck tag, init to 0 */

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095207463 ## fs/vfs/fs_ioctl.c: ## @@ -43,7 +43,7 @@ * Name: file_vioctl / -static int file_vioct

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095207463 ## fs/vfs/fs_ioctl.c: ## @@ -43,7 +43,7 @@ * Name: file_vioctl / -static int file_vioct

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2890406654 I tried to modify the fcntl/ioctl calls to separate fd and file requests. I don't think it is a good idea to modify/remove FIOC numbers. -- This is an automated message from the Apache G

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095120372 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095207463 ## fs/vfs/fs_ioctl.c: ## @@ -43,7 +43,7 @@ * Name: file_vioctl / -static int file_vioct

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095207463 ## fs/vfs/fs_ioctl.c: ## @@ -43,7 +43,7 @@ * Name: file_vioctl / -static int file_vioct

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095136393 ## fs/vfs/fs_open.c: ## @@ -372,7 +372,7 @@ int file_open(FAR struct file *filep, FAR const char *path, int oflags, ...) if (ret >= OK) { - FS_ADD_BACKTR

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095124199 ## include/nuttx/fs/ioctl.h: ## @@ -197,8 +197,6 @@ * configuration * OUT: N

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095120372 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095118825 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFIG_FDSAN

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-19 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095112790 ## fs/inode/fs_files.c: ## @@ -858,6 +1027,263 @@ int fs_putfilep(FAR struct file *filep) } #endif +/

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-17 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2094179941 ## fs/vfs/fs_ioctl.c: ## @@ -135,29 +135,12 @@ static int file_vioctl(FAR struct file *filep, int req, va_list ap) } break; -#ifdef CONFI

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-17 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2094174857 ## fs/vfs/fs_fcntl.c: ## @@ -46,7 +46,7 @@ * Name: file_vfcntl / -static int f

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-17 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2094177845 ## include/nuttx/fs/fs.h: ## @@ -466,6 +466,15 @@ struct file off_t f_pos; /* File position */ Review Comment: The memory leak will alwa

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-17 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2094175112 ## fs/vfs/fs_fcntl.c: ## @@ -91,7 +91,7 @@ static int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) */ { - ret = filep

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086976819 ## fs/vfs/fs_dup2.c: ## @@ -82,29 +81,15 @@ int file_dup3(FAR struct file *filep1, FAR struct file *filep2, int flags) inode = filep1->f_inode; inode_addref(inode

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086970591 ## net/local/local_sendmsg.c: ## @@ -125,7 +125,7 @@ static int local_sendctl(FAR struct local_conn_s *conn, goto fail; } - ret =

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
GUIDINGLI commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086926058 ## fs/vfs/fs_dup2.c: ## @@ -82,29 +81,15 @@ int file_dup3(FAR struct file *filep1, FAR struct file *filep2, int flags) inode = filep1->f_inode; inode_addref(in

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086894004 ## fs/vfs/fs_close.c: ## @@ -134,46 +143,84 @@ int file_close_without_clear(FAR struct file *filep) inode_release(inode); Review Comment: @Donn

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086872746 ## include/nuttx/fs/fs.h: ## @@ -466,6 +466,15 @@ struct file off_t f_pos; /* File position */ Review Comment: refcount is required to i

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086870916 ## include/nuttx/fs/fs.h: ## @@ -959,7 +964,7 @@ int files_duplist(FAR struct filelist *plist, FAR struct filelist *clist, * **

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086869529 ## net/local/local_recvmsg.c: ## @@ -175,7 +175,7 @@ static void local_recvctl(FAR struct local_conn_s *conn, count = peer->lc_cfpcount; for (i = 0; i < c

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
xiaoxiang781216 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086867781 ## net/local/local_sendmsg.c: ## @@ -125,7 +125,7 @@ static int local_sendctl(FAR struct local_conn_s *conn, goto fail; } -

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086328589 ## include/nuttx/fs/fs.h: ## @@ -466,6 +466,15 @@ struct file off_t f_pos; /* File position */ Review Comment: @anchao what is your opinion on th

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086067813 ## fs/inode/fs_files.c: ## @@ -266,25 +402,18 @@ static void task_fssync(FAR struct tcb_s *tcb, FAR void *arg) * ***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on PR #16361: URL: https://github.com/apache/nuttx/pull/16361#issuecomment-2875412623 ``` nsh> fdinfo pid:0 FD OFLAGS TYPE POS PATH BACKTRACE 0 3 10 /dev/console 0x40053878 0x400356e4 0x40038072

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086063889 ## fs/inode/fs_files.c: ## @@ -139,26 +198,26 @@ static int files_extend(FAR struct filelist *list, size_t row) return -EMFILE; } - files = fs_heap_mallo

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086069196 ## fs/inode/fs_files.c: ## @@ -66,61 +84,102 @@ * Name: files_fget_by_index / -static F

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086067813 ## fs/inode/fs_files.c: ## @@ -266,25 +402,18 @@ static void task_fssync(FAR struct tcb_s *tcb, FAR void *arg) * ***

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-13 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086066759 ## fs/inode/fs_files.c: ## @@ -246,6 +303,85 @@ static void task_fssync(FAR struct tcb_s *tcb, FAR void *arg) } } +/

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-12 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086063197 ## fs/inode/fs_files.c: ## @@ -554,16 +663,25 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode, { int i = minfd / CONFIG_NFILE_DESCRIPTO

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-12 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086061232 ## include/nuttx/fs/fs.h: ## @@ -490,20 +495,20 @@ struct file * (file descriptor % CONFIG_NFILE_DESCRIPTORS_PER_BLOCK) as column index. */ -struct filelist +struc

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-12 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2086061787 ## fs/inode/fs_files.c: ## @@ -554,16 +663,25 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode, { int i = minfd / CONFIG_NFILE_DESCRIPTO

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-12 Thread via GitHub
Donny9 commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2084821846 ## include/nuttx/fs/fs.h: ## @@ -490,20 +495,20 @@ struct file * (file descriptor % CONFIG_NFILE_DESCRIPTORS_PER_BLOCK) as column index. */ -struct filelist +struc

Re: [PR] fs/vfs: Separate file descriptors from file descriptions [nuttx]

2025-05-12 Thread via GitHub
pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2085174457 ## include/nuttx/fs/fs.h: ## @@ -466,6 +466,15 @@ struct file off_t f_pos; /* File position */ Review Comment: Yes I forgot to remove the option,

  1   2   >