* can futher be kernel-space or user-space addresses.
* or it can pointers to struct page's
*/
-static int precopy_buffers(struct orangefs_bufmap *bufmap,
- int buffer_index,
+static int precopy_buffers(int buffer_index,
struct iov_iter *iter,
size_t total_size)
{
if (total_size) {
- ret = orangefs_bufmap_copy_from_iovec(bufmap,
- iter,
+ ret = orangefs_bufmap_copy_from_iovec(iter,
buffer_index,
total_size);
if (ret < 0)
* can futher be kernel-space or user-space addresses.
* or it can pointers to struct page's
*/
-static int postcopy_buffers(struct orangefs_bufmap *bufmap,
- int buffer_index,
+static int postcopy_buffers(int buffer_index,
struct iov_iter *iter,
size_t total_size)
{
* struct page pointers.
*/
if (total_size) {
- ret = orangefs_bufmap_copy_to_iovec(bufmap,
- iter,
+ ret = orangefs_bufmap_copy_to_iovec(iter,
buffer_index,
total_size);
if (ret < 0)
* precopy_buffers only pertains to writes.
*/
if (type == ORANGEFS_IO_WRITE) {
- ret = precopy_buffers(bufmap,
- buffer_index,
+ ret = precopy_buffers(buffer_index,
iter,
total_size);
if (ret < 0)
* postcopy_buffers only pertains to reads.
*/
if (type == ORANGEFS_IO_READ) {
- ret = postcopy_buffers(bufmap,
- buffer_index,
+ ret = postcopy_buffers(buffer_index,
iter,
new_op->downcall.resp.io.amt_complete);
if (ret < 0)
* we've been handed an iovec, we need to copy it to
* the shared memory descriptor at "buffer_index".
*/
-int orangefs_bufmap_copy_from_iovec(struct orangefs_bufmap *bufmap,
- struct iov_iter *iter,
+int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
int buffer_index,
size_t size)
{
- struct orangefs_bufmap_desc *to = &bufmap->desc_array[buffer_index];
+ struct orangefs_bufmap_desc *to;
int i;
gossip_debug(GOSSIP_BUFMAP_DEBUG,
"%s: buffer_index:%d: size:%zu:\n",
__func__, buffer_index, size);
-
+ to = &__orangefs_bufmap->desc_array[buffer_index];
for (i = 0; size; i++) {
struct page *page = to->page_array[i];
size_t n = size;
* we've been handed an iovec, we need to fill it from
* the shared memory descriptor at "buffer_index".
*/
-int orangefs_bufmap_copy_to_iovec(struct orangefs_bufmap *bufmap,
- struct iov_iter *iter,
+int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter,
int buffer_index,
size_t size)
{
- struct orangefs_bufmap_desc *from = &bufmap->desc_array[buffer_index];
+ struct orangefs_bufmap_desc *from;
int i;
+ from = &__orangefs_bufmap->desc_array[buffer_index];
gossip_debug(GOSSIP_BUFMAP_DEBUG,
"%s: buffer_index:%d: size:%zu:\n",
__func__, buffer_index, size);
void orangefs_readdir_index_put(int buffer_index);
-int orangefs_bufmap_copy_from_iovec(struct orangefs_bufmap *bufmap,
- struct iov_iter *iter,
+int orangefs_bufmap_copy_from_iovec(struct iov_iter *iter,
int buffer_index,
size_t size);
-int orangefs_bufmap_copy_to_iovec(struct orangefs_bufmap *bufmap,
- struct iov_iter *iter,
+int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter,
int buffer_index,
size_t size);