[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 11/17] xen/hypfs: add getsize() and findentry() callbacks to hypfs_funcs
On 02.12.2020 16:51, Jürgen Groß wrote: > On 02.12.20 16:42, Jan Beulich wrote: >> On 01.12.2020 09:21, Juergen Gross wrote: >>> Add a getsize() function pointer to struct hypfs_funcs for being able >>> to have dynamically filled entries without the need to take the hypfs >>> lock each time the contents are being generated. >>> >>> For directories add a findentry callback to the vector and modify >>> hypfs_get_entry_rel() to use it. >>> >>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> >> >> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> >> with maybe one further small adjustment: >> >>> @@ -176,15 +188,41 @@ static int hypfs_get_path_user(char *buf, >>> return 0; >>> } >>> >>> +struct hypfs_entry *hypfs_leaf_findentry(const struct hypfs_entry_dir *dir, >>> + const char *name, >>> + unsigned int name_len) >>> +{ >>> + return ERR_PTR(-ENOENT); >>> +} >> >> ENOENT seems odd to me here. There looks to be no counterpart to >> EISDIR, so maybe ENODATA, EACCES, or EPERM? > > Hmm, why? > > In case I have /a/b and I'm looking for /a/b/c ENOENT seems to be just > fine? > > Or I could add ENOTDIR. Oh, there actually is supposed to be such an entry, but public/errno.h is simply missing it. Yes - ENOTDIR is what I was thinking of when saying "there looks to be no counterpart to EISDIR". Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |