Skip to content

Commit

Permalink
GPUDirect Storage kernel driver (nvidia-fs) ver-2.18.3 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabgupta3 committed Jan 17, 2024
1 parent e271646 commit 9a06dab
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
nvidia-fs (2.18.3) RELEASE; urgency=low
* Return error in DFS callback path for bad Meta data
* Fix compilation issue for 6.2 kernel

nvidia-fs (2.17.5) RELEASE; urgency=low
* removed the use of symbol_get APIs for nvidia_p2p_* APIs. nvidia-fs is restricted to NVIDIA UNIX Open Kernel Module for x86_64

Expand Down
5 changes: 4 additions & 1 deletion src/nvfs-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,10 @@ static int nvfs_dma_map_sg_attrs_internal(struct device *device,
return NVFS_IO_ERR;
}
// We have dma mapping set up
nvfs_mgroup_metadata_set_dma_state(sg_page(sg), nvfs_mgroup, sg->length, sg->offset);
if (nvfs_mgroup_metadata_set_dma_state(sg_page(sg), nvfs_mgroup, sg->length, sg->offset) < 0) {
nvfs_err("%s:%d mgroup_set_dma error\n", __func__, __LINE__);
ret = NVFS_IO_ERR;
}
nvfs_mgroup_put(nvfs_mgroup);
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/nvfs-mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,17 @@ nvfs_mgroup_ptr_t nvfs_mgroup_pin_shadow_pages(u64 cpuvaddr, unsigned long lengt
goto out;
}
cur_base_index = (pages[j]->index >> NVFS_MAX_SHADOW_PAGES_ORDER);
if(j == 0) {
nvfs_mgroup = nvfs_mgroup_get(cur_base_index);
if(nvfs_mgroup == NULL || unlikely(IS_ERR(nvfs_mgroup)))
goto out;
if(j == 0) {
nvfs_mgroup = nvfs_mgroup_get(cur_base_index);
if(nvfs_mgroup == NULL || unlikely(IS_ERR(nvfs_mgroup)))
goto out;

if ((nvfs_mgroup->nvfs_blocks_count != block_count)) {
nvfs_dbg("Mgroup Block count: %lu, block count:%lu\n", nvfs_mgroup->nvfs_blocks_count, block_count);
nvfs_dbg("Mgroup page: %p, page:%p\n", nvfs_mgroup->nvfs_ppages[j], pages[j]);
BUG_ON(nvfs_mgroup->nvfs_blocks_count < block_count);
}
}
}
BUG_ON((nvfs_mgroup->base_index != cur_base_index));
BUG_ON(j != (pages[j]->index % NVFS_MAX_SHADOW_PAGES));
BUG_ON((nvfs_mgroup->nvfs_ppages[j] != pages[j]));
Expand Down Expand Up @@ -1255,8 +1255,8 @@ int nvfs_mgroup_metadata_set_dma_state(struct page* page,
if(nvfs_mpage->nvfs_state != NVFS_IO_QUEUED &&
nvfs_mpage->nvfs_state != NVFS_IO_DMA_START)
{
nvfs_err("%s: found page in wrong state: %d, page->index: %ld at block: %d\n",
__func__, nvfs_mpage->nvfs_state, page->index % NVFS_MAX_SHADOW_PAGES, i);
nvfs_err("%s: found page in wrong state: %d, page->index: %ld at block: %d len: %u and offset: %u\n",
__func__, nvfs_mpage->nvfs_state, page->index % NVFS_MAX_SHADOW_PAGES, i, bv_len, bv_offset);
nvfs_mpage->nvfs_state = NVFS_IO_DMA_ERROR;
nvfs_mgroup_put(nvfs_mgroup);
WARN_ON_ONCE(1);
Expand Down
2 changes: 1 addition & 1 deletion src/nvfs-mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct nvfs_gpu_args {
u64 gpuvaddr; // GPU Buffer address
u64 gpu_buf_len; // length of gpu buffer
struct page *end_fence_page; // end fence addr pinned page
u32 offset_in_page; // end_fence_addr byte offset in end_fence_page
u32 offset_in_page; // end_fence_addr byte offset in end_fence_page
atomic_t io_state; // IO state transitions
atomic_t dma_mapping_in_progress; // Mapping in progress for a specific PCI device
atomic_t callback_invoked;
Expand Down
4 changes: 2 additions & 2 deletions src/nvfs-vers.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

#define NVFS_DRIVER_MAJOR_VERSION 2 //2-bytes

#define NVFS_DRIVER_MINOR_VERSION 17 //2-bytes
#define NVFS_DRIVER_MINOR_VERSION 18 //2-bytes

// template for build version
#define NVFS_DRIVER_PATCH_VERSION 5
#define NVFS_DRIVER_PATCH_VERSION 3

static inline unsigned int nvfs_driver_version(void) {
return (NVFS_DRIVER_MAJOR_VERSION << 16) | NVFS_DRIVER_MINOR_VERSION;
Expand Down

0 comments on commit 9a06dab

Please sign in to comment.