Re: [PATCH v2 0/5] vvfat: Fix write bugs for large files and add iotests

2024-05-04 Thread Amjad Alsharafi
, Amjad Alsharafi wrote: > v2: > Added iotests for `vvfat` driver along with a simple `fat16` module to run > the tests. > > v1: > https://patchew.org/QEMU/20240327201231.31046-1-amjadsharaf...@gmail.com/ > Fix the issue of writing to the middle of the file in vvfat &

[PATCH v2 4/5] iotests: Add `vvfat` tests

2024-05-04 Thread Amjad Alsharafi
Added several tests to verify the implementation of the vvfat driver. We needed a way to interact with it, so created a basic `fat16.py` driver that handled writing correct sectors for us. Signed-off-by: Amjad Alsharafi --- tests/qemu-iotests/check | 2 +- tests/qemu-iotests/fat16

[PATCH v2 5/5] iotests: Filter out `vvfat` fmt from failing tests

2024-05-04 Thread Amjad Alsharafi
`vvfat` is a special format and not all tests (even generic) can run without crashing. So, added `unsupported_fmt: vvfat` to all failling tests. Also added `vvfat` format into `meson.build`, vvfaat tests can be run on the `block-thorough` suite. Signed-off-by: Amjad Alsharafi --- .gitlab

[PATCH v2 2/5] vvfat: Fix usage of `info.file.offset`

2024-05-04 Thread Amjad Alsharafi
new clusters for files, and its inevitable that we reach this condition when doing that if the clusters are not after one another, so there is no reason to `abort` here, execution continues and the new clusters are written to disk correctly. Signed-off-by: Amjad Alsharafi --- block/vvfat.c | 9

[PATCH v2 3/5] vvfat: Fix reading files with non-continuous clusters

2024-05-04 Thread Amjad Alsharafi
dn't open anything) we will get the offset into the file with `s->cluster_size*(cluster_num-s->current_mapping->begin)`, which will give us `0x2000 * (504-500)`, which is out of bound for this mapping and will produce some issues. Signed-off-by: Amjad Alsharafi ---

[PATCH v2 0/5] vvfat: Fix write bugs for large files and add iotests

2024-05-04 Thread Amjad Alsharafi
v2: Added iotests for `vvfat` driver along with a simple `fat16` module to run the tests. v1: https://patchew.org/QEMU/20240327201231.31046-1-amjadsharaf...@gmail.com/ Fix the issue of writing to the middle of the file in vvfat Amjad Alsharafi (5): vvfat: Fix bug in writing to middle

[PATCH v2 1/5] vvfat: Fix bug in writing to middle of file

2024-05-04 Thread Amjad Alsharafi
!< offset=0x2000`, thus not fetching the next cluster. Signed-off-by: Amjad Alsharafi --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index 9d050ba3ae..ab342f0743 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2525,7 +252

Re: [PATCH 0/3] vvfat: Fix bugs in writing and reading files -- PING

2024-04-30 Thread Amjad Alsharafi
Ping again On Apr 13 2024, at 5:51 pm, Amjad Alsharafi wrote: > Ping to the vvfat maintainers. >

Re: [PATCH 0/3] vvfat: Fix bugs in writing and reading files -- PING

2024-04-13 Thread Amjad Alsharafi
Ping to the vvfat maintainers.

Re: [PATCH 3/3] ffvat: Fix reading files with non-continuous clusters

2024-03-29 Thread Amjad Alsharafi
I noticed the issue in the commit message 'ffvat' should be 'vvfat', I'll fix it in the next version. On Thu, Mar 28, 2024 at 04:11:27AM +0800, Amjad Alsharafi wrote: > When reading with `read_cluster` we get the `mapping` with > `find_mapping_for_cluster` and then we call `ope

[PATCH 1/3] vvfat: Fix bug in writing to middle of file

2024-03-27 Thread Amjad Alsharafi
!< offset=0x2000`, thus not fetching the next cluster. Signed-off-by: Amjad Alsharafi --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index 9d050ba3ae..ab342f0743 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2525,7 +252

[PATCH 3/3] ffvat: Fix reading files with non-continuous clusters

2024-03-27 Thread Amjad Alsharafi
dn't open anything) we will get the offset into the file with `s->cluster_size*(cluster_num-s->current_mapping->begin)`, which will give us `0x2000 * (504-500)`, which is out of bound for this mapping and will produce some issues. Signed-off-by: Amjad Alsharafi ---

[PATCH 0/3] vvfat: Fix bugs in writing and reading files

2024-03-27 Thread Amjad Alsharafi
These patches fix some bugs found when modifying files in vvfat. First, there was a bug when writing to the second+ cluster of a file, it will copy the cluster before it instead. Another issue was modifying the clusters of a file and adding new clusters, this showed 2 issues: - If the new

[PATCH 2/3] vvfat: Fix usage of `info.file.offset`

2024-03-27 Thread Amjad Alsharafi
new clusters for files, and its inevitable that we reach this condition when doing that if the clusters are not after one another, so there is no reason to `abort` here, execution continues and the new clusters are written to disk correctly. Signed-off-by: Amjad Alsharafi --- block/vvfat.c | 9