From: huanghua Date: Tue, 26 Sep 2006 10:28:10 +0000 (+0000) Subject: not implmented read() methed for symlink. X-Git-Tag: v1_8_0_110~486^2~821 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ae95b8365fdcfb6551125ce23861cf5a43fbaf67;p=fs%2Flustre-release.git not implmented read() methed for symlink. This happens while MDS umount and mount again; --- diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 584fe01..27b867e 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -1316,7 +1316,13 @@ static ssize_t osd_read(const struct lu_context *ctxt, struct dt_object *dt, * We'd like to use vfs_read() here, but it messes with * dnotify_parent() and locks. */ - result = file->f_op->read(file, buf, count, pos); + if (file->f_op->read) + result = file->f_op->read(file, buf, count, pos); + else { + /* TODO: how to serve symlink readlink()? */ + CERROR("read not implemented currently\n"); + result = -ENOSYS; + } osd_rw_fini(&seg); return result; } @@ -1333,7 +1339,12 @@ static ssize_t osd_write(const struct lu_context *ctxt, struct dt_object *dt, LASSERT(handle != NULL); file = osd_rw_init(ctxt, inode, &seg); - result = file->f_op->write(file, buf, count, pos); + if (file->f_op->write) + result = file->f_op->write(file, buf, count, pos); + else { + CERROR("write not implemented currently\n"); + result = -ENOSYS; + } osd_rw_fini(&seg); return result; }