On 26.06.14 17:08, Eugene "jno" Dvurechenski wrote:
On 06/26/2014 06:35 PM, Alexander Graf wrote:
- ns_end = sec + SECTOR_SIZE;
+ ns_end = sec + virtio_get_block_size();
...
-#define SECTOR_SIZE 512
+#define SECTOR_SIZE 4096
Why keep the define at all?
Just to use as default value and in storage allocation (and similar
static calculations) now.
Then either rename it MAX_SECTOR_SIZE and audit every single use of it
or try to convert everything to be dynamically sized - gcc should be
able to create arrays on the stack based on variables.
Alex