Thread (62 messages) 62 messages, 8 authors, 2021-04-21

Re: [PATCH v3 01/13] btrfs: add sysfs interface for supported sectorsize

From: David Sterba <hidden>
Date: 2021-03-29 18:23:17

On Thu, Mar 25, 2021 at 10:41:43PM +0800, Anand Jain wrote:
On 25/03/2021 15:14, Qu Wenruo wrote:
quoted
+static ssize_t supported_sectorsizes_show(struct kobject *kobj,
+					  struct kobj_attribute *a,
+					  char *buf)
+{
+	ssize_t ret = 0;
+
+	/* Only support sectorsize == PAGE_SIZE yet */
+	ret += scnprintf(buf + ret, PAGE_SIZE - ret, "%lu\n",
+			 PAGE_SIZE);
+	return ret;
+}
   ret can be removed completely here.
You mean to do 'return scnprintf(...)' ? For now it's just a single
value returned but with further support there will be a pattern like is
eg. in supported_checksums_show, so it's ok as a preparatory work.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help