search for: erofs

Displaying 20 results from an estimated 192 matches for "erofs".

2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li <frank.li at vivo.com> --- fs/erofs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/data.c b/fs/erofs/data.c index e16545849ea7..d394102ef9de 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -376,7 +376,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) if (bd...
2023 Mar 10
3
[PATCH v3 2/6] erofs: convert to use i_blockmask()
...ote: > Use i_blockmask() to simplify code. Umm... What's the branchpoint for that series? Not the mainline - there we have i_blocksize() open-coded... > Signed-off-by: Yangtao Li <frank.li at vivo.com> > --- > v3: > -none > v2: > -convert to i_blockmask() > fs/erofs/data.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/erofs/data.c b/fs/erofs/data.c > index 7e8baf56faa5..e9d1869cd4b3 100644 > --- a/fs/erofs/data.c > +++ b/fs/erofs/data.c > @@ -380,7 +380,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *i...
2023 Mar 10
1
[PATCH v3 2/6] erofs: convert to use i_blockmask()
...ecessary since it doesn't save a lot but anyway, I'm open to it if VFS could have such new helper. Thanks, Gao Xiang > >> Signed-off-by: Yangtao Li <frank.li at vivo.com> >> --- >> v3: >> -none >> v2: >> -convert to i_blockmask() >> fs/erofs/data.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/erofs/data.c b/fs/erofs/data.c >> index 7e8baf56faa5..e9d1869cd4b3 100644 >> --- a/fs/erofs/data.c >> +++ b/fs/erofs/data.c >> @@ -380,7 +380,7 @@ static ssize_t erofs_fi...
2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
...------ Hi Yangtao, On 2023/3/10 13:48, Yangtao Li wrote: > Use i_blockmask() to simplify code. > > Signed-off-by: Yangtao Li <frank.li at vivo.com> Please help drop this one since we'd like to use it until i_blockmask() lands to upstream. Thanks, Gao Xiang > --- > fs/erofs/data.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/erofs/data.c b/fs/erofs/data.c > index e16545849ea7..d394102ef9de 100644 > --- a/fs/erofs/data.c > +++ b/fs/erofs/data.c > @@ -376,7 +376,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *...
2013 Nov 05
1
ocfs2: why not set EROFS when clearing bits multiple times
In ocfs2_block_group_clear_bits, when num_bits != bits_cleared, it just log an error message without setting EROFS. The code is below: /* * If encountered, it means we are clearing bits multiple times. While * we are handling the case, we still need to be alerted to its * occurrence. Hence, marking it as an ERROR and not NOTICE. */ if (num_bits != bits_cleared) { mlog(ML_ERROR, "Trying to cle...
2011 May 27
2
[PATCH 1/1] ocfs2: Bugfix for hard readonly mount
...&OCFS2_I(inode)->ip_open_lockres; @@ -1718,6 +1718,12 @@ int ocfs2_try_open_lock(struct inode *inode, int write) (unsigned long long)OCFS2_I(inode)->ip_blkno, write ? "EXMODE" : "PRMODE"); + if (ocfs2_is_hard_readonly(osb)) { + if (write) + status = -EROFS; + goto out; + } + if (ocfs2_mount_local(osb)) goto out; @@ -2298,7 +2304,7 @@ int ocfs2_inode_lock_full_nested(struct inode *inode, if (ocfs2_is_hard_readonly(osb)) { if (ex) status = -EROFS; - goto bail; + goto getbh; } if (ocfs2_mount_local(osb)) @@ -2356,7 +2362,7 @@ lo...
2017 Dec 29
0
open() called from within Samba returns EROFS on a filesystem that was remounted R/W
...yes After connecting to the share via CIFS as an authenticated user, I get a "permission denied" message, with the error code being NT_STATUS_ACCESS_DENIED. I straced the forked Samba process that's running with the privileges of the user that I log in as, and saw that open() returns EROFS : getcwd("/mnt/storage", 4096) = 13 open("a", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0644) = -1 EROFS (Read-only file system) Meanwhile, running a simple "touch" on said mount point, as the same user as the one running the forked Samba process, works fine. Why...
2023 Mar 10
1
erofs: convert to use i_blockmask()
On Fri, Mar 10, 2023 at 11:51:21AM +0800, Yangtao Li wrote: > Hi AI, > > > Umm... What's the branchpoint for that series? > > Not the mainline - there we have i_blocksize() open-coded... > > Sorry, I'm based on the latest branch of the erofs repository. > > https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git/log/?h=dev-test > > I think I can resend based on mainline. > > > Umm... That actually asks for DIV_ROUND_UP(i_size_read_inode(), i_blocksize(inode)) > > - compiler should bloody well be a...
2019 Oct 04
1
Re: [nbdkit PATCH 2/5] retry: Check size before transactions
...rr)) > + return -1; > r = next_ops->pread (nxdata, buf, count, offset, flags, err); > if (r == -1 && do_retry (h, &data, next_ops, nxdata, err)) goto again; > > @@ -226,6 +239,8 @@ retry_pwrite (struct nbdkit_next_ops *next_ops, void *nxdata, > *err = EROFS; > return -1; > } > + if (! valid_range (next_ops, nxdata, count, offset, true, err)) > + return -1; > if (next_ops->can_write (nxdata) != 1) { > *err = EROFS; > r = -1; > @@ -258,6 +273,8 @@ retry_trim (struct nbdkit_next_ops *next_ops, void *nxd...
2023 Mar 09
8
[PATCH v3 1/6] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v3: -none v2: -convert to i_blockmask() include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..17387d465b8b
2023 Mar 10
5
[PATCH v4 1/5] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v4: -drop ext4 patch -erofs patch based on mainline -a bit change in ocfs2 patch include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..17387d465b8b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -711,6 +711,11 @@ static inline unsi...
2019 Oct 01
0
[nbdkit PATCH 3/6] retry: Check next_ops->can_FOO on retry
...open fails we treat it the same way as a command * failing. @@ -218,7 +222,16 @@ retry_pwrite (struct nbdkit_next_ops *next_ops, void *nxdata, int r; again: - r = next_ops->pwrite (nxdata, buf, count, offset, flags, err); + if (h->reopens && force_readonly) { + *err = EROFS; + return -1; + } + if (next_ops->can_write (nxdata) != 1) { + *err = EROFS; + r = -1; + } + else + r = next_ops->pwrite (nxdata, buf, count, offset, flags, err); if (r == -1 && do_retry (h, &data, next_ops, nxdata, err)) goto again; return r; @@ -236,7 +249...
2019 Oct 04
0
[nbdkit PATCH 2/5] retry: Check size before transactions
...xdata, count, offset, false, err)) + return -1; r = next_ops->pread (nxdata, buf, count, offset, flags, err); if (r == -1 && do_retry (h, &data, next_ops, nxdata, err)) goto again; @@ -226,6 +239,8 @@ retry_pwrite (struct nbdkit_next_ops *next_ops, void *nxdata, *err = EROFS; return -1; } + if (! valid_range (next_ops, nxdata, count, offset, true, err)) + return -1; if (next_ops->can_write (nxdata) != 1) { *err = EROFS; r = -1; @@ -258,6 +273,8 @@ retry_trim (struct nbdkit_next_ops *next_ops, void *nxdata, *err = EROFS; return -1;...
2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
Hi Gao Xiang, > Please help drop this one since we'd like to use it until i_blockmask() lands to upstream. I'm OK. Not sure if I need to resend v5? Thx, Yangtao
2023 Jan 25
2
[PATCH 00/12] acl: remove remaining posix acl handlers
...rs. If that were to happen we would miss to raise IOP_XATTR because sb->s_xattr would be NULL. Fix these things and then get rid of the misleading and effectively already unused generic POSIX ACL handlers. For most filesystems it is a trivial removal of the generic POSIX ACL handlers. Only for erofs, ext2, ext4, f2fs, jffs2, reiserfs, oc2fs the handler is used but rather easy to fix. All filesystems with reasonable integration into xfstests have been tested with: ./check -g acl,attr,cap,idmapped,io_uring,perms,unlink All tests pass without regression on xfstests for-next branch. Si...
2019 Aug 16
1
[nbdkit PATCH] ocaml: Map more errno values
...8084. Mapping of EOPNOTSUPP is essential for .zero to trigger a fallback to .pwrite, missed in commit 6c0e00e9 (not to mention that it becomes a valid protocol failure once fast zero support is added). There is no Unix.ENOTSUP, or that would get the same treatment per commit abb2b47c. Preserving EROFS and EFBIG is useful because protocol.c special-cases those (by merging them into EPERM and ENOSPC over the wire). There is no Unix.EDQUOT, or that would get the same treatment. Signed-off-by: Eric Blake <eblake@redhat.com> --- plugins/ocaml/ocaml.c | 7 +++++++ plugins/ocaml/NBDKit.ml |...
2023 Mar 09
5
[PATCH v2 1/5] fs: add i_blockmask()
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. ---------------------------------------------------------------------- Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()").
2013 Apr 22
4
Writing to a symlink on a read-only file system that land on a read-write file system
...ove works fine - the target of the symlink (/tmp/file) is created etc. with no error But on a machine with a 6.4 kernel, the above fails with: /mnt/tmp/file: Read-only file system. Strace'ing a process that fails gives: open("/mnt/tmp/file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EROFS (Read-only file system) I don't have a machine with a 6.3 kernel, so I'm not sure when the change in behaviour happened, but does anyone know as to why this change was made in the kernel? I've had a look through the kernel changelog - and the following entry mentions EROFS and rea...
2003 May 14
1
Bug with Large Files on AIX
...AIX machine. Here is a fix: diff -c -r rsync-2.5.6.orig/syscall.c rsync-2.5.6/syscall.c *** rsync-2.5.6.orig/syscall.c Sun Jan 26 21:09:02 2003 --- rsync-2.5.6/syscall.c Wed May 14 13:55:15 2003 *************** *** 151,157 **** if (dry_run) return -1; if (read_only) {errno = EROFS; return -1;} ! #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) { int fd = mkstemp(template); if (fd == -1) return -1; --- 151,157 ---- if (dry_run) return -1; if (read_only) {errno = EROFS; return -1;} ! #if defined(HAVE...
2023 May 04
1
[PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
...or happens, either in jounral layer or > >>>> filesystem. And we should not commit any further transactions. > >>>> It seems that we may unify the behavior like: > >>>> > >>>> if (is_journal_aborted(journal)) > >>>> return -EROFS; > >>>> > >>>> > >>> IIUC, do you mean add above code in ocfs2_commit_cache or in > >>> ocfs2_commit_thread? > >> > >> Yes, break the loop in ocfs2_commit_thread() in case of journal abort. > >> Actually we've hand...