Index: uspace/app/bdsh/cmds/modules/cat/cat.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cat/cat.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -31,4 +31,5 @@
 #include <stdlib.h>
 #include <unistd.h>
+#include <sys/stat.h>
 #include <getopt.h>
 #include <str.h>
@@ -187,4 +188,5 @@
 	size_t offset = 0, copied_bytes = 0;
 	off64_t file_size = 0, length = 0;
+	aoff64_t pos = 0;
 
 	bool reading_stdin = dash_represents_stdin && (str_cmp(fname, "-") == 0);
@@ -205,10 +207,18 @@
 		close(fd);
 		printf("Unable to allocate enough memory to read %s\n",
-			fname);
+		    fname);
 		return 1;
 	}
 
 	if (tail != CAT_FULL_FILE) {
-		file_size = lseek(fd, 0, SEEK_END);
+		struct stat st;
+
+		if (fstat(fd, &st) != EOK) {
+			close(fd);
+			free(buff);
+			printf("Unable to fstat %d\n", fd);
+			return 1;
+		}
+		file_size = st.size;
 		if (head == CAT_FULL_FILE) {
 			head = file_size;
@@ -223,7 +233,7 @@
 
 		if (tail_first) {
-			lseek(fd, (tail >= file_size) ? 0 : (file_size - tail), SEEK_SET);
+			pos = (tail >= file_size) ? 0 : (file_size - tail);
 		} else {
-			lseek(fd, ((head - tail) >= file_size) ? 0 : (head - tail), SEEK_SET);
+			pos = ((head - tail) >= file_size) ? 0 : (head - tail);
 		}
 	} else
@@ -243,5 +253,5 @@
 		}
 		
-		bytes = read(fd, buff + copied_bytes, bytes_to_read);
+		bytes = read(fd, &pos, buff + copied_bytes, bytes_to_read);
 		copied_bytes = 0;
 
Index: uspace/app/bdsh/cmds/modules/cmp/cmp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/bdsh/cmds/modules/cmp/cmp.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -79,4 +79,5 @@
 	char buffer[2][CMP_BUFLEN];
 	ssize_t offset[2];
+	aoff64_t pos[2] = {};
 
 	for (int i = 0; i < 2; i++) {
@@ -94,5 +95,6 @@
 			ssize_t size;
 			do {
-				size = read(fd[i], buffer[i] + offset[i],
+				size = read(fd[i], &pos[i],
+				    buffer[i] + offset[i],
 				    CMP_BUFLEN - offset[i]);
 				if (size < 0) {
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -377,4 +377,6 @@
 	int64_t copied = 0;
 	char *buff = NULL;
+	aoff64_t posr = 0, posw = 0;
+	struct stat st;
 
 	if (vb)
@@ -392,10 +394,14 @@
 	}
 
-	total = lseek(fd1, 0, SEEK_END);
-
+	if (fstat(fd1, &st) != EOK) {
+		printf("Unable to fstat %d\n", fd1);
+		close(fd1);
+		close(fd2);
+		return -1;	
+	}
+
+	total = st.size;
 	if (vb)
 		printf("%" PRIu64 " bytes to copy\n", total);
-
-	lseek(fd1, 0, SEEK_SET);
 
 	if (NULL == (buff = (char *) malloc(blen))) {
@@ -406,6 +412,6 @@
 	}
 
-	while ((bytes = read(fd1, buff, blen)) > 0) {
-		if ((bytes = write(fd2, buff, bytes)) < 0)
+	while ((bytes = read(fd1, &posr, buff, blen)) > 0) {
+		if ((bytes = write(fd2, &posw, buff, bytes)) < 0)
 			break;
 		copied += bytes;
Index: uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -121,4 +121,5 @@
 	void *buffer;
 	bool create_sparse = false;
+	aoff64_t pos = 0;
 
 	file_size = 0;
@@ -164,11 +165,7 @@
 	if (create_sparse && file_size > 0) {
 		const char byte = 0x00;
-
-		if ((rc2 = lseek(fd, file_size - 1, SEEK_SET)) < 0) {
-			close(fd);
-			goto error;
-		}
-
-		rc2 = write(fd, &byte, sizeof(char));
+		
+		pos = file_size - 1;
+		rc2 = write(fd, &pos, &byte, sizeof(char));
 		if (rc2 < 0) {
 			close(fd);
@@ -187,5 +184,5 @@
 	while (total_written < file_size) {
 		to_write = min(file_size - total_written, BUFFER_SIZE);
-		rc = write(fd, buffer, to_write);
+		rc = write(fd, &pos, buffer, to_write);
 		if (rc <= 0) {
 			printf("%s: Error writing file (%d).\n", cmdname, errno);
Index: uspace/app/sysinst/futil.c
===================================================================
--- uspace/app/sysinst/futil.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/sysinst/futil.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -60,4 +60,5 @@
 	ssize_t nr, nw;
 	int rc;
+	aoff64_t posr = 0, posw = 0;
 
 	printf("Copy '%s' to '%s'.\n", srcp, destp);
@@ -72,5 +73,5 @@
 
 	do {
-		nr = read(sf, buf, BUF_SIZE);
+		nr = read(sf, &posr, buf, BUF_SIZE);
 		if (nr == 0)
 			break;
@@ -78,5 +79,5 @@
 			return EIO;
 
-		nw = write(df, buf, nr);
+		nw = write(df, &posw, buf, nr);
 		if (nw <= 0)
 			return EIO;
@@ -157,7 +158,7 @@
 	int sf;
 	ssize_t nr;
-	off64_t off;
 	size_t fsize;
 	char *data;
+	struct stat st;
 
 	sf = open(srcp, O_RDONLY);
@@ -165,21 +166,23 @@
 		return ENOENT;
 
-	off = lseek(sf, 0, SEEK_END);
-	if (off == (off64_t)-1)
+	if (fstat(sf, &st) != EOK) {
+		close(sf);
 		return EIO;
+	}	
 
-	fsize = (size_t)off;
-
-	off = lseek(sf, 0, SEEK_SET);
-	if (off == (off64_t)-1)
-		return EIO;
+	fsize = st.size;
 
 	data = calloc(fsize, 1);
-	if (data == NULL)
+	if (data == NULL) {
+		close(sf);
 		return ENOMEM;
+	}
 
-	nr = read(sf, data, fsize);
-	if (nr != (ssize_t)fsize)
+	nr = read(sf, (aoff64_t []) { 0 }, data, fsize);
+	if (nr != (ssize_t)fsize) {
+		close(sf);
+		free(data);
 		return EIO;
+	}
 
 	(void) close(sf);
Index: uspace/app/taskdump/elf_core.c
===================================================================
--- uspace/app/taskdump/elf_core.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/taskdump/elf_core.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -67,6 +67,5 @@
 
 static off64_t align_foff_up(off64_t, uintptr_t, size_t);
-static int align_pos(int, size_t);
-static int write_mem_area(int, as_area_info_t *, async_sess_t *);
+static int write_mem_area(int, aoff64_t *, as_area_info_t *, async_sess_t *);
 
 #define BUFFER_SIZE 0x1000
@@ -97,4 +96,5 @@
 	elf_note_t note;
 	size_t word_size;
+	aoff64_t pos = 0;
 
 	int fd;
@@ -207,5 +207,5 @@
 	}
 
-	rc = write(fd, &elf_hdr, sizeof(elf_hdr));
+	rc = write(fd, &pos, &elf_hdr, sizeof(elf_hdr));
 	if (rc != sizeof(elf_hdr)) {
 		printf("Failed writing ELF header.\n");
@@ -215,5 +215,5 @@
 
 	for (i = 0; i < n_ph; ++i) {
-		rc = write(fd, &p_hdr[i], sizeof(p_hdr[i]));
+		rc = write(fd, &pos, &p_hdr[i], sizeof(p_hdr[i]));
 		if (rc != sizeof(p_hdr[i])) {
 			printf("Failed writing program header.\n");
@@ -223,9 +223,5 @@
 	}
 
-	if (lseek(fd, p_hdr[0].p_offset, SEEK_SET) == (off64_t) -1) {
-		printf("Failed writing memory data.\n");
-		free(p_hdr);
-		return EIO;
-	}
+	pos = p_hdr[0].p_offset;
 
 	/*
@@ -236,5 +232,5 @@
 	note.type = NT_PRSTATUS;
 
-	rc = write(fd, &note, sizeof(elf_note_t));
+	rc = write(fd, &pos, &note, sizeof(elf_note_t));
 	if (rc != sizeof(elf_note_t)) {
 		printf("Failed writing note header.\n");
@@ -243,5 +239,5 @@
 	}
 
-	rc = write(fd, "CORE", note.namesz);
+	rc = write(fd, &pos, "CORE", note.namesz);
 	if (rc != (ssize_t) note.namesz) {
 		printf("Failed writing note header.\n");
@@ -250,12 +246,7 @@
 	}
 
-	rc = align_pos(fd, word_size);
-	if (rc != EOK) {
-		printf("Failed writing note header.\n");
-		free(p_hdr);
-		return EIO;
-	}
-
-	rc = write(fd, &pr_status, sizeof(elf_prstatus_t));
+	pos = ALIGN_UP(pos, word_size);
+
+	rc = write(fd, &pos, &pr_status, sizeof(elf_prstatus_t));
 	if (rc != sizeof(elf_prstatus_t)) {
 		printf("Failed writing register data.\n");
@@ -265,10 +256,6 @@
 
 	for (i = 1; i < n_ph; ++i) {
-		if (lseek(fd, p_hdr[i].p_offset, SEEK_SET) == (off64_t) -1) {
-			printf("Failed writing memory data.\n");
-			free(p_hdr);
-			return EIO;
-		}
-		if (write_mem_area(fd, &ainfo[i - 1], sess) != EOK) {
+		pos = p_hdr[i].p_offset;
+		if (write_mem_area(fd, &pos, &ainfo[i - 1], sess) != EOK) {
 			printf("Failed writing memory data.\n");
 			free(p_hdr);
@@ -297,4 +284,5 @@
  *
  * @param fd   File to write to.
+ * @param pos  Pointer to the position to write to.
  * @param area Memory area info structure.
  * @param sess Debugging session.
@@ -303,5 +291,6 @@
  *
  */
-static int write_mem_area(int fd, as_area_info_t *area, async_sess_t *sess)
+static int write_mem_area(int fd, aoff64_t *pos, as_area_info_t *area,
+    async_sess_t *sess)
 {
 	size_t to_copy;
@@ -321,5 +310,5 @@
 		}
 
-		rc = write(fd, buffer, to_copy);
+		rc = write(fd, pos, buffer, to_copy);
 		if (rc != (ssize_t) to_copy) {
 			printf("Failed writing memory contents.\n");
@@ -334,23 +323,4 @@
 }
 
-static int align_pos(int fd, size_t align)
-{
-	off64_t cur_pos;
-	size_t rem, adv;
-
-	cur_pos = lseek(fd, 0, SEEK_CUR);
-	if (cur_pos < 0)
-		return -1;
-
-	rem = cur_pos % align;
-	adv = align - rem;
-
-	cur_pos = lseek(fd, adv, SEEK_CUR);
-	if (cur_pos < 0)
-		return -1;
-
-	return EOK;
-}
-
 /** @}
  */
Index: uspace/app/taskdump/symtab.c
===================================================================
--- uspace/app/taskdump/symtab.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/taskdump/symtab.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -68,4 +68,5 @@
 	char *shstrt, *sec_name;
 	void *data;
+	aoff64_t pos = 0;
 
 	int fd;
@@ -88,5 +89,5 @@
 	}
 
-	rc = read(fd, &elf_hdr, sizeof(elf_header_t));
+	rc = read(fd, &pos, &elf_hdr, sizeof(elf_header_t));
 	if (rc != sizeof(elf_header_t)) {
 		printf("failed reading elf header\n");
@@ -304,11 +305,7 @@
 {
 	int rc;
-
-	rc = lseek(fd, elf_hdr->e_shoff + idx * sizeof(elf_section_header_t),
-	    SEEK_SET);
-	if (rc == (off64_t) -1)
-		return EIO;
-
-	rc = read(fd, sec_hdr, sizeof(elf_section_header_t));
+	aoff64_t pos = elf_hdr->e_shoff + idx * sizeof(elf_section_header_t);
+
+	rc = read(fd, &pos, sec_hdr, sizeof(elf_section_header_t));
 	if (rc != sizeof(elf_section_header_t))
 		return EIO;
@@ -331,12 +328,5 @@
 {
 	ssize_t rc;
-	off64_t offs;
-
-	offs = lseek(fd, start, SEEK_SET);
-	if (offs == (off64_t) -1) {
-		printf("failed seeking chunk\n");
-		*ptr = NULL;
-		return EIO;
-	}
+	aoff64_t pos = start;
 
 	*ptr = malloc(size);
@@ -346,5 +336,5 @@
 	}
 
-	rc = read(fd, *ptr, size);
+	rc = read(fd, &pos, *ptr, size);
 	if (rc != (ssize_t) size) {
 		printf("failed reading chunk\n");
Index: uspace/app/tester/mm/pager1.c
===================================================================
--- uspace/app/tester/mm/pager1.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/tester/mm/pager1.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -52,5 +52,6 @@
 		return NULL;
 	(void) unlink(TEST_FILE);
-	if (write(fd, text, sizeof(text)) != sizeof(text)) {
+
+	if (write(fd, (aoff64_t []) {0}, text, sizeof(text)) != sizeof(text)) {
 		close(fd);
 		return NULL;
Index: uspace/app/tester/vfs/vfs1.c
===================================================================
--- uspace/app/tester/vfs/vfs1.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/tester/vfs/vfs1.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -70,4 +70,6 @@
 const char *test_vfs1(void)
 {
+	aoff64_t pos = 0;
+
 	if (mkdir(TEST_DIRECTORY, 0) != 0) {
 		TPRINTF("rc=%d\n", errno);
@@ -82,16 +84,14 @@
 	
 	size_t size = sizeof(text);
-	ssize_t cnt = write(fd0, text, size);
+	ssize_t cnt = write(fd0, &pos, text, size);
 	if (cnt < 0)
 		return "write() failed";
 	TPRINTF("Written %zd bytes\n", cnt);
-	
-	if (lseek(fd0, 0, SEEK_SET) != 0)
-		return "lseek() failed";
-	TPRINTF("Sought to position 0\n");
+
+	pos = 0;
 	
 	char buf[BUF_SIZE];
 	TPRINTF("read..\n");
-	while ((cnt = read(fd0, buf, BUF_SIZE))) {
+	while ((cnt = read(fd0, &pos, buf, BUF_SIZE))) {
 		TPRINTF("read returns %zd\n", cnt);
 		if (cnt < 0)
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/trace/trace.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -701,10 +701,8 @@
 
 	p = proto_new("vfs");
-	o = oper_new("read", 1, arg_def, V_ERRNO, 1, resp_def);
+	o = oper_new("read", 3, arg_def, V_ERRNO, 1, resp_def);
 	proto_add_oper(p, VFS_IN_READ, o);
-	o = oper_new("write", 1, arg_def, V_ERRNO, 1, resp_def);
+	o = oper_new("write", 3, arg_def, V_ERRNO, 1, resp_def);
 	proto_add_oper(p, VFS_IN_WRITE, o);
-	o = oper_new("seek", 3, arg_def, V_ERRNO, 0, resp_def);
-	proto_add_oper(p, VFS_IN_SEEK, o);
 	o = oper_new("truncate", 5, arg_def, V_ERRNO, 0, resp_def);
 	proto_add_oper(p, VFS_IN_TRUNCATE, o);
Index: uspace/app/viewer/viewer.c
===================================================================
--- uspace/app/viewer/viewer.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/viewer/viewer.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -126,6 +126,6 @@
 		return false;
 	}
-	
-	ssize_t rd = read(fd, tga, stat.size);
+
+	ssize_t rd = read(fd, (aoff64_t []) {0}, tga, stat.size);
 	if ((rd < 0) || (rd != (ssize_t) stat.size)) {
 		free(tga);
Index: uspace/app/websrv/websrv.c
===================================================================
--- uspace/app/websrv/websrv.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/app/websrv/websrv.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -238,6 +238,7 @@
 		return rc;
 	
+	aoff64_t pos = 0;
 	while (true) {
-		ssize_t nr = read(fd, fbuf, BUFFER_SIZE);
+		ssize_t nr = read(fd, &pos, fbuf, BUFFER_SIZE);
 		if (nr == 0)
 			break;
Index: uspace/drv/bus/isa/isa.c
===================================================================
--- uspace/drv/bus/isa/isa.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/drv/bus/isa/isa.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -254,4 +254,5 @@
 	size_t len;
 	ssize_t r;
+	struct stat st;
 
 	fd = open(conf_path, O_RDONLY);
@@ -263,6 +264,10 @@
 	opened = true;
 
-	len = lseek(fd, 0, SEEK_END);
-	lseek(fd, 0, SEEK_SET);
+	if (fstat(fd, &st) != EOK) {
+		ddf_msg(LVL_ERROR, "Unable to fstat %d", fd);
+		goto cleanup;
+	}
+
+	len = st.size;
 	if (len == 0) {
 		ddf_msg(LVL_ERROR, "Configuration file '%s' is empty.",
@@ -277,5 +282,5 @@
 	}
 
-	r = read(fd, buf, len);
+	r = read(fd, (aoff64_t []) {0}, buf, len);
 	if (r < 0) {
 		ddf_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path);
Index: uspace/lib/bithenge/src/file.c
===================================================================
--- uspace/lib/bithenge/src/file.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/bithenge/src/file.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -78,18 +78,9 @@
 	if (offset > blob->size)
 		return ELIMIT;
-	if (lseek(blob->fd, offset, SEEK_SET) < 0)
-		return errno == EINVAL ? EIO : errno;
 
-	ssize_t amount_read;
-	aoff64_t remaining_size = *size;
-	*size = 0;
-	do {
-		amount_read = read(blob->fd, buffer, remaining_size);
-		if (amount_read < 0)
-			return errno;
-		buffer += amount_read;
-		*size += amount_read;
-		remaining_size -= amount_read;
-	} while (remaining_size && amount_read);
+	ssize_t amount_read = read(blob->fd, &offset, buffer, *size);
+	if (amount_read < 0)
+		return errno;
+	*size += amount_read;
 	return EOK;
 }
Index: uspace/lib/c/generic/elf/elf_mod.c
===================================================================
--- uspace/lib/c/generic/elf/elf_mod.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/generic/elf/elf_mod.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -135,7 +135,8 @@
 	elf_header_t header_buf;
 	elf_header_t *header = &header_buf;
+	aoff64_t pos = 0;
 	int i, rc;
 
-	rc = read(elf->fd, header, sizeof(elf_header_t));
+	rc = read(elf->fd, &pos, header, sizeof(elf_header_t));
 	if (rc != sizeof(elf_header_t)) {
 		DPRINTF("Read error.\n"); 
@@ -195,9 +196,6 @@
 		elf_segment_header_t segment_hdr;
 
-		/* Seek to start of segment header */
-		lseek(elf->fd, header->e_phoff
-		        + i * sizeof(elf_segment_header_t), SEEK_SET);
-
-		rc = read(elf->fd, &segment_hdr,
+		pos = header->e_phoff + i * sizeof(elf_segment_header_t);
+		rc = read(elf->fd, &pos, &segment_hdr,
 		    sizeof(elf_segment_header_t));
 		if (rc != sizeof(elf_segment_header_t)) {
@@ -217,9 +215,6 @@
 		elf_section_header_t section_hdr;
 
-		/* Seek to start of section header */
-		lseek(elf->fd, header->e_shoff
-		    + i * sizeof(elf_section_header_t), SEEK_SET);
-
-		rc = read(elf->fd, &section_hdr,
+		pos = header->e_shoff + i * sizeof(elf_section_header_t);
+		rc = read(elf->fd, &pos, &section_hdr,
 		    sizeof(elf_section_header_t));
 		if (rc != sizeof(elf_section_header_t)) {
@@ -333,4 +328,5 @@
 	uintptr_t seg_addr;
 	size_t mem_sz;
+	aoff64_t pos;
 	ssize_t rc;
 
@@ -390,11 +386,6 @@
 	 * Load segment data
 	 */
-	rc = lseek(elf->fd, entry->p_offset, SEEK_SET);
-	if (rc < 0) {
-		printf("seek error\n");
-		return EE_INVALID;
-	}
-
-	rc = read(elf->fd, seg_ptr, entry->p_filesz);
+	pos = entry->p_offset;
+	rc = read(elf->fd, &pos, seg_ptr, entry->p_filesz);
 	if (rc < 0) {
 		DPRINTF("read error\n");
Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/generic/io/io.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -41,4 +41,5 @@
 #include <stdbool.h>
 #include <malloc.h>
+#include <sys/stat.h>
 #include <async.h>
 #include <io/kio.h>
@@ -56,4 +57,5 @@
 static FILE stdin_null = {
 	.fd = -1,
+	.pos = 0, 
 	.error = true,
 	.eof = true,
@@ -70,4 +72,5 @@
 static FILE stdout_kio = {
 	.fd = -1,
+	.pos = 0, 
 	.error = false,
 	.eof = false,
@@ -84,4 +87,5 @@
 static FILE stderr_kio = {
 	.fd = -1,
+	.pos = 0, 
 	.error = false,
 	.eof = false,
@@ -288,4 +292,5 @@
 	}
 	
+	stream->pos = 0;
 	stream->error = false;
 	stream->eof = false;
@@ -311,4 +316,5 @@
 	
 	stream->fd = fd;
+	stream->pos = 0;
 	stream->error = false;
 	stream->eof = false;
@@ -396,27 +402,17 @@
 static size_t _fread(void *buf, size_t size, size_t nmemb, FILE *stream)
 {
-	size_t left, done;
-
 	if (size == 0 || nmemb == 0)
 		return 0;
 
-	left = size * nmemb;
-	done = 0;
-	
-	while ((left > 0) && (!stream->error) && (!stream->eof)) {
-		ssize_t rd = read(stream->fd, buf + done, left);
-		
-		if (rd < 0) {
-			/* errno was set by read() */
-			stream->error = true;
-		} else if (rd == 0) {
-			stream->eof = true;
-		} else {
-			left -= rd;
-			done += rd;
-		}
-	}
-	
-	return (done / size);
+	ssize_t rd = read(stream->fd, &stream->pos, buf, size * nmemb);
+	if (rd < 0) {
+		/* errno was set by read() */
+		stream->error = true;
+		rd = 0;
+	} else if (rd == 0) {
+		stream->eof = true;
+	}
+	
+	return (rd / size);
 }
 
@@ -433,48 +429,30 @@
 static size_t _fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
 {
-	size_t left;
-	size_t done;
-	int rc;
-
 	if (size == 0 || nmemb == 0)
 		return 0;
 
-	left = size * nmemb;
-	done = 0;
-
-	while ((left > 0) && (!stream->error)) {
-		ssize_t wr;
-		size_t uwr;
-		
-		if (stream->kio) {
-			uwr = 0;
-			rc = kio_write(buf + done, left, &uwr);
-			if (rc != EOK)
-				errno = rc;
+	ssize_t wr;
+	if (stream->kio) {
+		size_t nwritten;
+		wr = kio_write(buf, size * nmemb, &nwritten);
+		if (wr != EOK) {
+			stream->error = true;
+			wr = 0;
 		} else {
-			wr = write(stream->fd, buf + done, left);
-			if (wr >= 0) {
-				uwr = (size_t)wr;
-				rc = EOK;
-			} else {
-				/* errno was set by write */
-				uwr = 0;
-				rc = errno;
-			}
-		}
-		
-		if (rc != EOK) {
-			/* errno was set above */
+			wr = nwritten;
+		}
+	} else {
+		wr = write(stream->fd, &stream->pos, buf, size * nmemb);
+		if (wr < 0) {
+			/* errno was set by write() */
 			stream->error = true;
-		} else {
-			left -= uwr;
-			done += uwr;
-		}
-	}
-
-	if (done > 0)
+			wr = 0;
+		}
+	}
+
+	if (wr > 0)
 		stream->need_sync = true;
 	
-	return (done / size);
+	return (wr / size);
 }
 
@@ -489,5 +467,5 @@
 	stream->buf_head = stream->buf_tail = stream->buf;
 
-	rc = read(stream->fd, stream->buf, stream->buf_size);
+	rc = read(stream->fd, &stream->pos, stream->buf, stream->buf_size);
 	if (rc < 0) {
 		/* errno was set by read() */
@@ -516,13 +494,6 @@
 
 	/* If buffer has prefetched read data, we need to seek back. */
-	if (bytes_used > 0 && stream->buf_state == _bs_read) {
-		off64_t rc;
-		rc = lseek(stream->fd, - (ssize_t) bytes_used, SEEK_CUR);
-		if (rc == (off64_t)-1) {
-			/* errno was set by lseek */
-			stream->error = 1;
-			return;
-		}
-	}
+	if (bytes_used > 0 && stream->buf_state == _bs_read)
+		stream->pos -= bytes_used;
 
 	/* If buffer has unwritten data, we need to write them out. */
@@ -796,21 +767,31 @@
 int fseek(FILE *stream, off64_t offset, int whence)
 {
-	off64_t rc;
-
 	if (stream->error)
-		return EOF;
+		return -1;
 
 	_fflushbuf(stream);
 	if (stream->error) {
 		/* errno was set by _fflushbuf() */
-		return EOF;
+		return -1;
 	}
 
 	stream->ungetc_chars = 0;
 
-	rc = lseek(stream->fd, offset, whence);
-	if (rc == (off64_t) (-1)) {
-		/* errno has been set by lseek() */
-		return EOF;
+	struct stat st;
+	switch (whence) {
+	case SEEK_SET:
+		stream->pos = offset;
+		break;
+	case SEEK_CUR:
+		stream->pos += offset;
+		break;
+	case SEEK_END:
+		if (fstat(stream->fd, &st) != EOK) {
+			/* errno was set by fstat() */
+			stream->error = true;
+			return -1;	
+		}
+		stream->pos = st.size + offset;
+		break;
 	}
 
@@ -821,6 +802,4 @@
 off64_t ftell(FILE *stream)
 {
-	off64_t pos;
-	
 	if (stream->error)
 		return EOF;
@@ -832,11 +811,5 @@
 	}
 
-	pos = lseek(stream->fd, 0, SEEK_CUR);
-	if (pos == (off64_t) -1) {
-		/* errno was set by lseek */
-		return (off64_t) -1;
-	}
-	
-	return pos - stream->ungetc_chars;
+	return stream->pos - stream->ungetc_chars;
 }
 
Index: uspace/lib/c/generic/private/stdio.h
===================================================================
--- uspace/lib/c/generic/private/stdio.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/generic/private/stdio.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -49,4 +49,7 @@
 	/** Underlying file descriptor. */
 	int fd;
+
+	/** File position. */
+	aoff64_t pos;
 	
 	/** Error indicator. */
Index: uspace/lib/c/generic/vfs/vfs.c
===================================================================
--- uspace/lib/c/generic/vfs/vfs.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/generic/vfs/vfs.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -444,4 +444,5 @@
  *
  * @param fildes File descriptor
+ * @param pos Position to read from
  * @param buf Buffer
  * @param nbyte Maximum number of bytes to read
@@ -450,5 +451,6 @@
  * @return EOK on success, non-zero error code on error.
  */
-static int _read_short(int fildes, void *buf, size_t nbyte, ssize_t *nread)
+static int _read_short(int fildes, aoff64_t pos, void *buf, size_t nbyte,
+    ssize_t *nread)
 {
 	sysarg_t rc;
@@ -461,5 +463,6 @@
 	async_exch_t *exch = vfs_exchange_begin();
 	
-	req = async_send_1(exch, VFS_IN_READ, fildes, &answer);
+	req = async_send_3(exch, VFS_IN_READ, fildes, LOWER32(pos),
+	    UPPER32(pos), &answer);
 	rc = async_data_read_start(exch, (void *) buf, nbyte);
 
@@ -484,4 +487,5 @@
  *
  * @param fildes File descriptor
+ * @param pos Position to write to
  * @param buf Buffer
  * @param nbyte Maximum number of bytes to write
@@ -490,5 +494,5 @@
  * @return EOK on success, non-zero error code on error.
  */
-static int _write_short(int fildes, const void *buf, size_t nbyte,
+static int _write_short(int fildes, aoff64_t pos, const void *buf, size_t nbyte,
     ssize_t *nwritten)
 {
@@ -502,5 +506,6 @@
 	async_exch_t *exch = vfs_exchange_begin();
 	
-	req = async_send_1(exch, VFS_IN_WRITE, fildes, &answer);
+	req = async_send_3(exch, VFS_IN_WRITE, fildes, LOWER32(pos),
+	    UPPER32(pos), &answer);
 	rc = async_data_write_start(exch, (void *) buf, nbyte);
 	
@@ -525,4 +530,5 @@
  *
  * @param fildes	File descriptor
+ * @param pos		Pointer to position to read from 
  * @param buf		Buffer, @a nbytes bytes long
  * @param nbytes	Number of bytes to read
@@ -531,5 +537,5 @@
  *			On failure, -1 and sets errno.
  */
-ssize_t read(int fildes, void *buf, size_t nbyte)
+ssize_t read(int fildes, aoff64_t *pos, void *buf, size_t nbyte)
 {
 	ssize_t cnt = 0;
@@ -541,5 +547,6 @@
 		bp += cnt;
 		nread += cnt;
-		rc = _read_short(fildes, bp, nbyte - nread, &cnt);
+		*pos += cnt;
+		rc = _read_short(fildes, *pos, bp, nbyte - nread, &cnt);
 	} while (rc == EOK && cnt > 0 && (nbyte - nread - cnt) > 0);
 	
@@ -549,4 +556,5 @@
 	}
 	
+	*pos += cnt;
 	return nread + cnt;
 }
@@ -557,4 +565,5 @@
  *
  * @param fildes	File descriptor
+ * @param pos		Pointer to position to write to
  * @param buf		Data, @a nbytes bytes long
  * @param nbytes	Number of bytes to write
@@ -563,5 +572,5 @@
  *			On failure, -1 and sets errno.
  */
-ssize_t write(int fildes, const void *buf, size_t nbyte)
+ssize_t write(int fildes, aoff64_t *pos, const void *buf, size_t nbyte)
 {
 	ssize_t cnt = 0;
@@ -573,5 +582,6 @@
 		bp += cnt;
 		nwritten += cnt;
-		rc = _write_short(fildes, bp, nbyte - nwritten, &cnt);
+		*pos += cnt;
+		rc = _write_short(fildes, *pos, bp, nbyte - nwritten, &cnt);
 	} while (rc == EOK && ((ssize_t )nbyte - nwritten - cnt) > 0);
 
@@ -581,4 +591,5 @@
 	}
 
+	*pos += cnt;
 	return nbyte;
 }
@@ -601,33 +612,4 @@
 	
 	return 0;
-}
-
-/** Seek to a position.
- *
- * @param fildes File descriptor
- * @param offset Offset
- * @param whence SEEK_SET, SEEK_CUR or SEEK_END
- *
- * @return On success the nonnegative offset from start of file. On error
- *         returns (off64_t)-1 and sets errno.
- */
-off64_t lseek(int fildes, off64_t offset, int whence)
-{
-	async_exch_t *exch = vfs_exchange_begin();
-	
-	sysarg_t newoff_lo;
-	sysarg_t newoff_hi;
-	sysarg_t rc = async_req_4_2(exch, VFS_IN_SEEK, fildes,
-	    LOWER32(offset), UPPER32(offset), whence,
-	    &newoff_lo, &newoff_hi);
-	
-	vfs_exchange_end(exch);
-	
-	if (rc != EOK) {
-		errno = rc;
-		return (off64_t) -1;
-	}
-	
-	return (off64_t) MERGE_LOUP32(newoff_lo, newoff_hi);
 }
 
@@ -757,4 +739,5 @@
 	
 	dirp->fd = fd;
+	dirp->pos = 0;
 	return dirp;
 }
@@ -771,5 +754,6 @@
 	ssize_t len;
 	
-	rc = _read_short(dirp->fd, &dirp->res.d_name[0], NAME_MAX + 1, &len);
+	rc = _read_short(dirp->fd, dirp->pos, &dirp->res.d_name[0],
+	    NAME_MAX + 1, &len);
 	if (rc != EOK) {
 		errno = rc;
@@ -777,5 +761,6 @@
 	}
 	
-	(void) len;
+	dirp->pos += len;
+	
 	return &dirp->res;
 }
@@ -787,5 +772,5 @@
 void rewinddir(DIR *dirp)
 {
-	(void) lseek(dirp->fd, 0, SEEK_SET);
+	dirp->pos = 0;
 }
 
Index: uspace/lib/c/include/dirent.h
===================================================================
--- uspace/lib/c/include/dirent.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/include/dirent.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -38,4 +38,6 @@
 #define NAME_MAX  256
 
+#include <sys/types.h>
+
 struct dirent {
 	char d_name[NAME_MAX + 1];
@@ -45,4 +47,5 @@
 	int fd;
 	struct dirent res;
+	aoff64_t pos;
 } DIR;
 
Index: uspace/lib/c/include/ipc/vfs.h
===================================================================
--- uspace/lib/c/include/ipc/vfs.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/include/ipc/vfs.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -65,5 +65,4 @@
 	VFS_IN_READ = IPC_FIRST_USER_METHOD,
 	VFS_IN_WRITE,
-	VFS_IN_SEEK,
 	VFS_IN_TRUNCATE,
 	VFS_IN_FSTAT,
Index: uspace/lib/c/include/stdio.h
===================================================================
--- uspace/lib/c/include/stdio.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/include/stdio.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -54,16 +54,4 @@
 			(void) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) _buf, str_size(_buf)); \
 	}
-
-#ifndef SEEK_SET
-	#define SEEK_SET  0
-#endif
-
-#ifndef SEEK_CUR
-	#define SEEK_CUR  1
-#endif
-
-#ifndef SEEK_END
-	#define SEEK_END  2
-#endif
 
 enum _buffer_type {
Index: uspace/lib/c/include/unistd.h
===================================================================
--- uspace/lib/c/include/unistd.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/include/unistd.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -60,8 +60,7 @@
 extern int dup2(int, int);
 
-extern ssize_t write(int, const void *, size_t);
-extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, aoff64_t *, const void *, size_t);
+extern ssize_t read(int, aoff64_t *, void *, size_t);
 
-extern off64_t lseek(int, off64_t, int);
 extern int ftruncate(int, aoff64_t);
 
Index: uspace/lib/c/include/vfs/vfs.h
===================================================================
--- uspace/lib/c/include/vfs/vfs.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/c/include/vfs/vfs.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -43,4 +43,6 @@
 #include <async.h>
 
+#define MAX_OPEN_FILES	128
+
 enum vfs_change_state_type {
 	VFS_PASS_HANDLE
Index: uspace/lib/pcut/src/os/helenos.c
===================================================================
--- uspace/lib/pcut/src/os/helenos.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/pcut/src/os/helenos.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -214,5 +214,6 @@
 	fibril_mutex_unlock(&forced_termination_mutex);
 
-	read(tempfile, extra_output_buffer, OUTPUT_BUFFER_SIZE);
+	aoff64_t pos = 0;
+	read(tempfile, &pos, extra_output_buffer, OUTPUT_BUFFER_SIZE);
 
 leave_close_tempfile:
Index: uspace/lib/posix/source/internal/common.h
===================================================================
--- uspace/lib/posix/source/internal/common.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/posix/source/internal/common.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -38,4 +38,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <sys/types.h>
+#include <vfs/vfs.h>
 
 #define not_implemented() do { \
@@ -57,4 +59,6 @@
 })
 
+extern aoff64_t posix_pos[MAX_OPEN_FILES];
+
 #endif /* LIBPOSIX_COMMON_H_ */
 
Index: uspace/lib/posix/source/stdio.c
===================================================================
--- uspace/lib/posix/source/stdio.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/posix/source/stdio.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -344,5 +344,6 @@
 static int _dprintf_str_write(const char *str, size_t size, void *fd)
 {
-	ssize_t wr = write(*(int *) fd, str, size);
+	const int fildes = *(int *) fd;
+	ssize_t wr = write(fildes, &posix_pos[fildes], str, size);
 	if (wr < 0)
 		return errno;
@@ -371,7 +372,7 @@
 		}
 		
-		if (write(*(int *) fd, buf, sz) != (ssize_t) sz) {
+		const int fildes = *(int *) fd;
+		if (write(fildes, &posix_pos[fildes], buf, sz) != (ssize_t) sz)
 			break;
-		}
 		
 		chars++;
Index: uspace/lib/posix/source/unistd.c
===================================================================
--- uspace/lib/posix/source/unistd.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/lib/posix/source/unistd.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -47,4 +47,8 @@
 #include "libc/stats.h"
 #include "libc/malloc.h"
+#include "libc/vfs/vfs.h"
+#include "libc/sys/stat.h"
+
+aoff64_t posix_pos[MAX_OPEN_FILES];
 
 /* Array of environment variable strings (NAME=VALUE). */
@@ -175,4 +179,5 @@
 int posix_close(int fildes)
 {
+	posix_pos[fildes] = 0;
 	return negerrno(close, fildes);
 }
@@ -188,5 +193,5 @@
 ssize_t posix_read(int fildes, void *buf, size_t nbyte)
 {
-	return negerrno(read, fildes, buf, nbyte);
+	return negerrno(read, fildes, &posix_pos[fildes], buf, nbyte);
 }
 
@@ -201,5 +206,5 @@
 ssize_t posix_write(int fildes, const void *buf, size_t nbyte)
 {
-	return negerrno(write, fildes, buf, nbyte);
+	return negerrno(write, fildes, &posix_pos[fildes], buf, nbyte);
 }
 
@@ -215,5 +220,22 @@
 posix_off_t posix_lseek(int fildes, posix_off_t offset, int whence)
 {
-	return negerrno(lseek, fildes, offset, whence);
+	struct stat st;
+
+	switch (whence) {
+	case SEEK_SET:
+		posix_pos[fildes] = offset;
+		break;
+	case SEEK_CUR:
+		posix_pos[fildes] += offset;
+		break;
+	case SEEK_END:
+		if (fstat(fildes, &st) != EOK) {
+			errno = -errno;
+			return -1;
+		}
+		posix_pos[fildes] = st.size + offset;
+		break;
+	}
+	return posix_pos[fildes];
 }
 
Index: uspace/srv/devman/match.c
===================================================================
--- uspace/srv/devman/match.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/srv/devman/match.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -201,4 +201,5 @@
 	int fd;
 	size_t len = 0;
+	struct stat st;
 	
 	fd = open(conf_path, O_RDONLY);
@@ -210,6 +211,10 @@
 	opened = true;
 	
-	len = lseek(fd, 0, SEEK_END);
-	lseek(fd, 0, SEEK_SET);
+	if (fstat(fd, &st) != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to fstat %d: %s.", fd,
+		    str_error(errno));
+		goto cleanup;
+	}
+	len = st.size;
 	if (len == 0) {
 		log_msg(LOG_DEFAULT, LVL_ERROR, "Configuration file '%s' is empty.",
@@ -225,5 +230,5 @@
 	}
 	
-	ssize_t read_bytes = read(fd, buf, len);
+	ssize_t read_bytes = read(fd, (aoff64_t []) {0}, buf, len);
 	if (read_bytes <= 0) {
 		log_msg(LOG_DEFAULT, LVL_ERROR, "Unable to read file '%s' (%d).", conf_path,
Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/srv/vfs/vfs.h	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -142,7 +142,4 @@
 	/** Append on write. */
 	bool append;
-
-	/** Current absolute position in the file. */
-	int64_t pos;
 } vfs_file_t;
 
@@ -190,6 +187,4 @@
 extern int64_t vfs_node_get_size(vfs_node_t *node);
 extern bool vfs_node_has_children(vfs_node_t *node);
-
-#define MAX_OPEN_FILES	128
 
 extern void *vfs_client_data_create(void);
@@ -216,7 +211,6 @@
 extern int vfs_op_mtab_get(void);
 extern int vfs_op_open2(int fd, int flags);
-extern int vfs_op_read(int fd, size_t *out_bytes);
+extern int vfs_op_read(int fd, aoff64_t, size_t *out_bytes);
 extern int vfs_op_rename(int basefd, char *old, char *new);
-extern int vfs_op_seek(int fd, int64_t offset, int whence, int64_t *out_offset);
 extern int vfs_op_statfs(int fd);
 extern int vfs_op_sync(int fd);
@@ -226,5 +220,5 @@
 extern int vfs_op_wait_handle(bool high_fd);
 extern int vfs_op_walk(int parentfd, int flags, char *path, int *out_fd);
-extern int vfs_op_write(int fd, size_t *out_bytes);
+extern int vfs_op_write(int fd, aoff64_t, size_t *out_bytes);
 
 extern void vfs_register(ipc_callid_t, ipc_call_t *);
@@ -237,5 +231,5 @@
 } rdwr_io_chunk_t;
 
-extern int vfs_rdwr_internal(int, bool, rdwr_io_chunk_t *);
+extern int vfs_rdwr_internal(int, aoff64_t, bool, rdwr_io_chunk_t *);
 
 extern void vfs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg);
Index: uspace/srv/vfs/vfs_file.c
===================================================================
--- uspace/srv/vfs/vfs_file.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/srv/vfs/vfs_file.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -45,4 +45,5 @@
 #include <adt/list.h>
 #include <task.h>
+#include <vfs/vfs.h>
 #include "vfs.h"
 
Index: uspace/srv/vfs/vfs_ipc.c
===================================================================
--- uspace/srv/vfs/vfs_ipc.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/srv/vfs/vfs_ipc.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -122,7 +122,9 @@
 {
 	int fd = IPC_GET_ARG1(*request);
+	aoff64_t pos = MERGE_LOUP32(IPC_GET_ARG2(*request),
+	    IPC_GET_ARG3(*request));
 
 	size_t bytes = 0;
-	int rc = vfs_op_read(fd, &bytes);
+	int rc = vfs_op_read(fd, pos, &bytes);
 	async_answer_1(rid, rc, bytes);
 }
@@ -170,15 +172,4 @@
 	if (new)
 		free(new);
-}
-
-static void vfs_in_seek(ipc_callid_t rid, ipc_call_t *request)
-{
-	int fd = (int) IPC_GET_ARG1(*request);
-	int64_t off = (int64_t) MERGE_LOUP32(IPC_GET_ARG2(*request), IPC_GET_ARG3(*request));
-	int whence = (int) IPC_GET_ARG4(*request);
-
-	int64_t new_offset = 0;
-	int rc = vfs_op_seek(fd, off, whence, &new_offset);
-	async_answer_2(rid, rc, LOWER32(new_offset), UPPER32(new_offset));
 }
 
@@ -256,7 +247,9 @@
 {
 	int fd = IPC_GET_ARG1(*request);
+	aoff64_t pos = MERGE_LOUP32(IPC_GET_ARG2(*request),
+	    IPC_GET_ARG3(*request));
 
 	size_t bytes = 0;
-	int rc = vfs_op_write(fd, &bytes);
+	int rc = vfs_op_write(fd, pos, &bytes);
 	async_answer_1(rid, rc, bytes);
 }
@@ -308,7 +301,4 @@
 			vfs_in_rename(callid, &call);
 			break;
-		case VFS_IN_SEEK:
-			vfs_in_seek(callid, &call);
-			break;
 		case VFS_IN_STATFS:
 			vfs_in_statfs(callid, &call);
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/srv/vfs/vfs_ops.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -343,8 +343,8 @@
 }
 
-typedef int (* rdwr_ipc_cb_t)(async_exch_t *, vfs_file_t *, ipc_call_t *,
-    bool, void *);
-
-static int rdwr_ipc_client(async_exch_t *exch, vfs_file_t *file,
+typedef int (* rdwr_ipc_cb_t)(async_exch_t *, vfs_file_t *, aoff64_t,
+    ipc_call_t *, bool, void *);
+
+static int rdwr_ipc_client(async_exch_t *exch, vfs_file_t *file, aoff64_t pos,
     ipc_call_t *answer, bool read, void *data)
 {
@@ -363,9 +363,9 @@
 		rc = async_data_read_forward_4_1(exch, VFS_OUT_READ,
 		    file->node->service_id, file->node->index,
-		    LOWER32(file->pos), UPPER32(file->pos), answer);
+		    LOWER32(pos), UPPER32(pos), answer);
 	} else {
 		rc = async_data_write_forward_4_1(exch, VFS_OUT_WRITE,
 		    file->node->service_id, file->node->index,
-		    LOWER32(file->pos), UPPER32(file->pos), answer);
+		    LOWER32(pos), UPPER32(pos), answer);
 	}
 
@@ -374,5 +374,5 @@
 }
 
-static int rdwr_ipc_internal(async_exch_t *exch, vfs_file_t *file,
+static int rdwr_ipc_internal(async_exch_t *exch, vfs_file_t *file, aoff64_t pos,
     ipc_call_t *answer, bool read, void *data)
 {
@@ -383,6 +383,6 @@
 	
 	aid_t msg = async_send_fast(exch, read ? VFS_OUT_READ : VFS_OUT_WRITE,
-	    file->node->service_id, file->node->index, LOWER32(file->pos),
-	    UPPER32(file->pos), answer);
+	    file->node->service_id, file->node->index, LOWER32(pos),
+	    UPPER32(pos), answer);
 	if (msg == 0)
 		return EINVAL;
@@ -402,5 +402,6 @@
 }
 
-static int vfs_rdwr(int fd, bool read, rdwr_ipc_cb_t ipc_cb, void *ipc_cb_data)
+static int vfs_rdwr(int fd, aoff64_t pos, bool read, rdwr_ipc_cb_t ipc_cb,
+    void *ipc_cb_data)
 {
 	/*
@@ -463,6 +464,9 @@
 	async_exch_t *fs_exch = vfs_exchange_grab(file->node->fs_handle);
 	
-	if (!read && file->append)
-		file->pos = file->node->size;
+	if (!read && file->append) {
+		if (file->node->size == -1)
+			file->node->size = vfs_node_get_size(file->node);
+		pos = file->node->size;
+	}
 	
 	/*
@@ -470,9 +474,7 @@
 	 */
 	ipc_call_t answer;
-	int rc = ipc_cb(fs_exch, file, &answer, read, ipc_cb_data);
+	int rc = ipc_cb(fs_exch, file, pos, &answer, read, ipc_cb_data);
 	
 	vfs_exchange_release(fs_exch);
-	
-	size_t bytes = IPC_GET_ARG1(answer);
 	
 	if (file->node->type == VFS_NODE_DIRECTORY)
@@ -491,7 +493,4 @@
 	}
 	
-	/* Update the position pointer and unlock the open file. */
-	if (rc == EOK)
-		file->pos += bytes;
 	vfs_file_put(file);	
 
@@ -499,12 +498,12 @@
 }
 
-int vfs_rdwr_internal(int fd, bool read, rdwr_io_chunk_t *chunk)
-{
-	return vfs_rdwr(fd, read, rdwr_ipc_internal, chunk);
-}
-
-int vfs_op_read(int fd, size_t *out_bytes)
-{
-	return vfs_rdwr(fd, true, rdwr_ipc_client, out_bytes);
+int vfs_rdwr_internal(int fd, aoff64_t pos, bool read, rdwr_io_chunk_t *chunk)
+{
+	return vfs_rdwr(fd, pos, read, rdwr_ipc_internal, chunk);
+}
+
+int vfs_op_read(int fd, aoff64_t pos, size_t *out_bytes)
+{
+	return vfs_rdwr(fd, pos, true, rdwr_ipc_client, out_bytes);
 }
 
@@ -608,60 +607,4 @@
 	fibril_rwlock_write_unlock(&namespace_rwlock);
 	return EOK;
-}
-
-int vfs_op_seek(int fd, int64_t offset, int whence, int64_t *out_offset)
-{
-	vfs_file_t *file = vfs_file_get(fd);
-	if (!file)
-		return EBADF;
-	
-	switch (whence) {
-	case SEEK_SET:
-		if (offset < 0) {
-			vfs_file_put(file);
-			return EINVAL;
-		}
-		file->pos = offset;
-		*out_offset = offset;
-		vfs_file_put(file);
-		return EOK;
-	case SEEK_CUR:
-		if (offset > 0 && file->pos > (INT64_MAX - offset)) {
-			vfs_file_put(file);
-			return EOVERFLOW;
-		}
-		
-		if (offset < 0 && -file->pos > offset) {
-			vfs_file_put(file);
-			return EOVERFLOW;
-		}
-		
-		file->pos += offset;
-		*out_offset = file->pos;
-		vfs_file_put(file);
-		return EOK;
-	case SEEK_END:
-		fibril_rwlock_read_lock(&file->node->contents_rwlock);
-		int64_t size = vfs_node_get_size(file->node);
-		fibril_rwlock_read_unlock(&file->node->contents_rwlock);
-		
-		if (offset > 0 && size > (INT64_MAX - offset)) {
-			vfs_file_put(file);
-			return EOVERFLOW;
-		}
-		
-		if (offset < 0 && -size > offset) {
-			vfs_file_put(file);
-			return EOVERFLOW;
-		}
-		
-		file->pos = size + offset;
-		*out_offset = file->pos;
-		vfs_file_put(file);
-		return EOK;
-	}
-	
-	vfs_file_put(file);
-	return EINVAL;
 }
 
@@ -953,7 +896,7 @@
 }
 
-int vfs_op_write(int fd, size_t *out_bytes)
-{
-	return vfs_rdwr(fd, false, rdwr_ipc_client, out_bytes);
+int vfs_op_write(int fd, aoff64_t pos, size_t *out_bytes)
+{
+	return vfs_rdwr(fd, pos, false, rdwr_ipc_client, out_bytes);
 }
 
Index: uspace/srv/vfs/vfs_pager.c
===================================================================
--- uspace/srv/vfs/vfs_pager.c	(revision c9e36929bc69d822bcd4d70b26ffb747976fe403)
+++ uspace/srv/vfs/vfs_pager.c	(revision 58898d1d7329ba67528bada931d3269d42936354)
@@ -50,10 +50,4 @@
 	int rc;
 
-	vfs_file_t *file = vfs_file_get(fd);
-	if (!file) {
-		async_answer_0(rid, ENOENT);
-		return;
-	}
-
 	page = as_area_create(AS_AREA_ANY, page_size,
 	    AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE,
@@ -61,5 +55,4 @@
 
 	if (page == AS_MAP_FAILED) {
-		vfs_file_put(file);
 		async_answer_0(rid, ENOMEM);
 		return;
@@ -71,10 +64,8 @@
 	};
 
-	file->pos = offset;
-	vfs_file_put(file);
-
 	size_t total = 0;
+	aoff64_t pos = offset;
 	do {
-		rc = vfs_rdwr_internal(fd, true, &chunk);
+		rc = vfs_rdwr_internal(fd, pos, true, &chunk);
 		if (rc != EOK)
 			break;
@@ -82,4 +73,5 @@
 			break;
 		total += chunk.size;
+		pos += chunk.size;
 		chunk.buffer += chunk.size;
 		chunk.size = page_size - total;
