Commit Graph

9 Commits

Author SHA1 Message Date
YAMAMOTO Takashi 761ee81956 move readv/writev to the kernel
currently, nuttx implements readv/writev on the top of read/write.
while it might work for the simplest cases, it's broken by design.
for example, it's impossible to make it work correctly for files
which need to preserve data boundaries without allocating a single
contiguous buffer. (udp socket, some character devices, etc)

this change is a start of the migration to a better design.
that is, implement read/write on the top of readv/writev.

to avoid a single huge change, following things will NOT be done in
this commit:

* fix actual bugs caused by the original readv-based-on-read design.
  (cf. https://github.com/apache/nuttx/pull/12674)

* adapt filesystems/drivers to actually benefit from the new interface.
  (except a few trivial examples)

* eventually retire the old interface.

* retire read/write syscalls. implement them in libc instead.

* pread/pwrite/preadv/pwritev (except the introduction of struct uio,
  which is a preparation to back these variations with the new
  interface.)
2024-10-30 17:07:54 +08:00
ligd 662bbeb33e container_of: fix compile failed cause of list.h not support container_of
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-23 20:10:43 +08:00
Yongrong Wang 60ab9ae37e virtio_9p.c: fix compile error in OpenAMP upgrade feature reflow to dev
v9fs/virtio_9p.c:223:3: error: too few arguments to function 'virtio_negotiate_features'
  223 |   virtio_negotiate_features(vdev, 1 << VIRTIO_9P_MOUNT_TAG);
v9fs/virtio_9p.c:245:9: error: too few arguments to function 'virtio_create_virtqueues'
  245 |   ret = virtio_create_virtqueues(vdev, 0, 1, vqname, callback);

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-09 23:32:58 +08:00
chenrun1 96206cbf9d fs/xxfs:Replace kmm with fs heap
Summary:
  1.Add configuration to allocate memory from the specified section
  2.Replace all memory operations (kmm_) in the vfs with
    fs_heap_. When FS_HEAPSIZE > 0, memory is requested for the file system by specifying a configured heap location. By default (i.e. FS_HEAPSIZE=0) fs_heap_ is equivalent to kmm_

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-30 16:30:56 +08:00
simbit18 583f025422 Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
2024-09-17 22:16:41 +08:00
chenrun1 a7f5c37a63 v9fs/client.c:fix in x86 qemu crash
Summary:
  In the x86 environment, memory does not necessarily start at 0, so when end is 0x0, start = end + 1, and then determine the contents of start, it will cause x86 to cause a crash when accessing an illegal address.
This problem does not occur in the arm environment because arm starts at 0x0, so the content of the 0x1 address is “\0”.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-19 11:05:40 -03:00
chenrun1 1e3e551a19 v9fs/client.h:fix array type has incomplete element type
Summary:
fix error:
v9fs/client.c: In function 'v9fs_client_walk':
v9fs/client.c:1462:16: error: array type has incomplete element type 'struct iovec'
 1462 |   struct iovec wiov[2];
      |                ^~~~
v9fs/client.c:1463:16: error: array type has incomplete element type 'struct iovec'
 1463 |   struct iovec riov[2];
      |                ^~~~
v9fs/client.c:1463:16: warning: unused variable 'riov' [-Wunused-variable]
v9fs/client.c:1462:16: warning: unused variable 'wiov' [-Wunused-variable]
 1462 |   struct iovec wiov[2];
      |                ^~~~
v9fs/client.c: In function 'v9fs_transport_done':
v9fs/client.c:1721:49: error: invalid use of undefined type 'struct iovec'
 1721 |   FAR struct v9fs_lerror_s *error = cookie->riov[0].iov_base;
      |                                                 ^
v9fs/client.c:1721:52: error: invalid use of undefined type 'struct iovec'
 1721 |   FAR struct v9fs_lerror_s *error = cookie->riov[0].iov_base;
      |                                                    ^

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-19 11:05:40 -03:00
chenrun1 fa7403db5a v9fs:Support ioctl to get relpath
Summary:
  1.The relpath information is stored in the fid structure
  2.The relative path information is only saved in the client. When the server changes, the relpath saved in the fid will not change.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-19 11:05:40 -03:00
chenrun1 aee9125350 v9fs:File system based on 9P2000L.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-19 11:05:40 -03:00